Packages

A simple Cryptography Implementation in Elixir for the Ark Blockchain.

Current section

Files

Jump to
arkecosystem_crypto lib arkecosystem crypto transactions serialisers delegate_registration.ex
Raw

lib/arkecosystem/crypto/transactions/serialisers/delegate_registration.ex

defmodule ArkEcosystem.Crypto.Transactions.Serializers.DelegateRegistration do
def serialize(bytes, transaction) do
username = transaction.asset.delegate.username
length = byte_size(username)
bytes <> <<length::little-unsigned-integer-size(8)>> <> username
end
end