def parse_assets_data(data, offset: 0)
      v, len = WireFormat.read_uint8(data: data, offset: offset)
      raise ArgumentError, "Invalid data: verified flag" if !v
      asset_hash, len = WireFormat.read_string(data: data, offset: len) # empty or 20 bytes
      raise ArgumentError, "Invalid data: asset hash" if !asset_hash
      value, len = WireFormat.read_int64le(data: data, offset: len)
      raise ArgumentError, "Invalid data: value" if !value
      @verified = (v == 1)
      @asset_id = asset_hash.bytesize > 0 ? AssetID.new(hash: asset_hash) : nil
      @value = value
      len
    end
def parse_assets_data(data, offset: 0)
      v, len = WireFormat.read_uint8(data: data, offset: offset)
      raise ArgumentError, "Invalid data: verified flag" if !v
      asset_hash, len = WireFormat.read_string(data: data, offset: len) # empty or 20 bytes
      raise ArgumentError, "Invalid data: asset hash" if !asset_hash
      value, len = WireFormat.read_int64le(data: data, offset: len)
      raise ArgumentError, "Invalid data: value" if !value
      @verified = (v == 1)
      @asset_id = asset_hash.bytesize > 0 ? AssetID.new(hash: asset_hash) : nil
      @value = value
      len
    end
Returns total length read