Class: ArkEcosystem::Crypto::Transactions::Deserializers::DelegateRegistration
- Inherits:
-
Base
- Object
- Base
- ArkEcosystem::Crypto::Transactions::Deserializers::DelegateRegistration
- Defined in:
- lib/arkecosystem/crypto/transactions/deserializers/delegate_registration.rb
Overview
The deserializer for delegate registration 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 17 18 19 |
# File 'lib/arkecosystem/crypto/transactions/deserializers/delegate_registration.rb', line 7 def deserialize @transaction.asset = { delegate: {} } username_length = @binary.unpack("C#{@asset_offset / 2}Q<").last & 0xff username = @serialized[@asset_offset + 2, username_length * 2] @transaction.asset[:delegate][:username] = BTC::Data.data_from_hex(username) @transaction.parse_signatures(@serialized, @asset_offset + (username_length + 1) * 2) end |