class Nis::Transaction::Transfer
@attr [String] recipient @attr [Integer] amount @attr [Nis::Struct::Message] message @attr [Array <Nis::Struct::MosaicId>] mosaics @attr [Integer] type @attr [Nis::Fee::Transfer] fee @attr [Integer] deadline @attr [Integer] timestamp @attr [Integer] version @attr [String] signer @attr [Symbol] network @see nemproject.github.io/#transferTransaction @see nemproject.github.io/#initiating-a-transfer-transaction @see nemproject.github.io/#version-1-transfer-transactions @see nemproject.github.io/#version-2-transfer-transactions
Constants
- TYPE
Attributes
amount[RW]
deadline[RW]
fee[R]
message[RW]
mosaics[RW]
network[RW]
recipient[RW]
signer[RW]
timeStamp[RW]
timestamp[RW]
type[R]
version[RW]
Public Class Methods
new(recipient, amount, message = '', mosaics: [], network: :testnet)
click to toggle source
# File lib/nis/transaction/transfer.rb, line 30 def initialize(recipient, amount, message = '', mosaics: [], network: :testnet) @type = TYPE @network = network @recipient = recipient @amount = amount @message = message.is_a?(Nis::Struct::Message) ? message : Nis::Struct::Message.new(message.to_s) @fee = Nis::Fee::Transfer.new(self) @mosaics = mosaics end
Public Instance Methods
has_message?()
click to toggle source
# File lib/nis/transaction/transfer.rb, line 43 def has_message? @message.bytesize > 0 end
has_mosaics?()
click to toggle source
# File lib/nis/transaction/transfer.rb, line 47 def has_mosaics? @mosaics.size > 0 end