Class: ArkEcosystem::Crypto::Transactions::Builder::Vote

Inherits:
Base
  • Object
show all
Defined in:
lib/arkecosystem/crypto/transactions/builder/vote.rb

Overview

The builder for vote transactions.

Instance Method Summary collapse

Methods inherited from Base

#initialize, #second_sign, #second_verify, #sign_and_create_id, #verify

Constructor Details

This class inherits a constructor from ArkEcosystem::Crypto::Transactions::Builder::Base

Instance Method Details

#set_votes(votes) ⇒ Object



12
13
14
15
# File 'lib/arkecosystem/crypto/transactions/builder/vote.rb', line 12

def set_votes(votes)
  @transaction.asset[:votes] = votes
  self
end

#sign(passphrase) ⇒ Object



17
18
19
20
# File 'lib/arkecosystem/crypto/transactions/builder/vote.rb', line 17

def sign(passphrase)
  @transaction.recipient_id = ArkEcosystem::Crypto::Identities::Address.from_passphrase(passphrase)
  sign_and_create_id(passphrase)
end

#typeObject



22
23
24
# File 'lib/arkecosystem/crypto/transactions/builder/vote.rb', line 22

def type
  ArkEcosystem::Crypto::Enums::Types::VOTE
end