Class: ArkEcosystem::Crypto::Transactions::Deserializers::Transfer
- Defined in:
- lib/arkecosystem/crypto/transactions/deserializers/transfer.rb
Overview
The deserializer for transfer transactions.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from ArkEcosystem::Crypto::Transactions::Deserializers::Base
Instance Method Details
#deserialize ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/arkecosystem/crypto/transactions/deserializers/transfer.rb', line 7 def deserialize @transaction.amount = @binary.unpack("C#{@asset_offset / 2}Q<").last @transaction.expiration = @binary.unpack("C#{@asset_offset / 2 + 8}").last recipient_id = @binary.unpack("H#{(@asset_offset / 2 + 12) * 2}H42").last @transaction.recipient_id = BTC::Base58.base58check_from_data([recipient_id].pack('H*')) puts @transaction @transaction.parse_signatures(@serialized, @asset_offset + (21 + 12) * 2) end |