Class: ArkEcosystem::Crypto::Deserialisers::DelegateRegistration
- Defined in:
- lib/arkecosystem/crypto/deserialisers/delegate_registration.rb
Overview
The deserialiser for delegate registration transactions.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from ArkEcosystem::Crypto::Deserialisers::Base
Instance Method Details
#deserialise ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/arkecosystem/crypto/deserialisers/delegate_registration.rb', line 6 def deserialise @transaction[:asset] = { delegate: {} } username_length = @binary.unpack("C#{@asset_offset / 2}Q<").last & 0xff username = @serialised[@asset_offset + 2, username_length * 2] @transaction[:asset][:delegate][:username] = BTC::Data.data_from_hex(username) ArkEcosystem::Crypto::Crypto.parse_signatures(@serialised, @transaction, @asset_offset + (username_length + 1) * 2) end |