class ArkEcosystem::Crypto::Transactions::Builder::DelegateRegistration

The builder for delegate registration transactions.

Public Instance Methods

set_username(username) click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/delegate_registration.rb, line 12
def set_username(username)
  @username = username
  self
end
sign(passphrase) click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/delegate_registration.rb, line 17
def sign(passphrase)
  @transaction.asset = {
    delegate: {
      username: @username,
      public_key: ArkEcosystem::Crypto::Identities::PublicKey.from_passphrase(passphrase)
    }
  }
  sign_and_create_id(passphrase)
end
type() click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/delegate_registration.rb, line 27
def type
  ArkEcosystem::Crypto::Enums::Types::DELEGATE_REGISTRATION
end