class ArkEcosystem::Crypto::Transactions::Builder::Base
The base builder for transactions.
Public Class Methods
new()
click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/base.rb, line 14 def initialize @transaction = ArkEcosystem::Crypto::Transactions::Transaction.new() @transaction.type = type @transaction.fee = ArkEcosystem::Crypto::Configuration::Fee.get(@transaction.type) @transaction.sender_public_key = nil @transaction.recipient_id = nil @transaction.amount = 0 @transaction.vendor_field = nil @transaction.timestamp = ArkEcosystem::Crypto::Utils::Slot.get_time @transaction.asset = {} end
Public Instance Methods
second_sign(second_passphrase)
click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/base.rb, line 36 def second_sign(second_passphrase) @transaction.second_sign(second_passphrase) @transaction.id = @transaction.get_id self end
second_verify(second_public_key)
click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/base.rb, line 46 def second_verify(second_public_key) @transaction.second_verify(second_public_key) end
sign(passphrase)
click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/base.rb, line 26 def sign(passphrase) sign_and_create_id(passphrase) end
sign_and_create_id(passphrase)
click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/base.rb, line 30 def sign_and_create_id(passphrase) @transaction.sign(passphrase) @transaction.id = @transaction.get_id self end
verify()
click to toggle source
# File lib/arkecosystem/crypto/transactions/builder/base.rb, line 42 def verify @transaction.verify end