Class: ArkEcosystem::Crypto::Transactions::Deserializers::IPFS

Inherits:
Base
  • Object
show all
Defined in:
lib/arkecosystem/crypto/transactions/deserializers/ipfs.rb

Overview

The deserializer for IPFS transactions.

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ArkEcosystem::Crypto::Transactions::Deserializers::Base

Instance Method Details

#deserializeObject



7
8
9
10
11
12
13
14
15
# File 'lib/arkecosystem/crypto/transactions/deserializers/ipfs.rb', line 7

def deserialize
  @transaction.asset = {}

  dag_length = @binary.unpack("C#{@asset_offset / 2}Q<").last & 0xff

  @transaction.asset[:dag] = @serialized[@asset_offset + 2, dag_length * 2]

  @transaction.parse_signatures(@serialized, @asset_offset + 2 + length * 2)
end