Class: Nem::Transaction::ImportanceTransfer
- Defined in:
- lib/nem/transaction/importance_transfer.rb
Overview
Constant Summary collapse
- TYPE =
2049 (importance transfer transaction)
0x0801
- ACTIVATE =
0x0001
- DEACTIVATE =
0x0002
Constants inherited from Base
Instance Attribute Summary collapse
-
#mode ⇒ Symbol
The current value of mode.
-
#remote_account ⇒ String
The current value of remote_account.
Attributes inherited from Base
#deadline, #fee, #signature, #signer, #timestamp, #type
Instance Method Summary collapse
-
#initialize(remote_account, mode, timestamp: nil, deadline: nil, network: nil) ⇒ ImportanceTransfer
constructor
A new instance of ImportanceTransfer.
-
#to_hash ⇒ Hash
attributes must be CAMEL CASE for NIS params.
Methods inherited from Base
Constructor Details
#initialize(remote_account, mode, timestamp: nil, deadline: nil, network: nil) ⇒ ImportanceTransfer
Returns a new instance of ImportanceTransfer.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/nem/transaction/importance_transfer.rb', line 14 def initialize(remote_account, mode, timestamp: nil, deadline: nil, network: nil) @remote_account = remote_account @mode = mode @network = network || Nem.default_network @type = TYPE @fee = Nem::Fee::ImportanceTransfer.new(self) @timestamp = || Time.now @deadline = deadline || Time.now + Nem.default_deadline end |
Instance Attribute Details
#mode ⇒ Symbol
Returns the current value of mode.
6 7 8 |
# File 'lib/nem/transaction/importance_transfer.rb', line 6 def mode @mode end |
#remote_account ⇒ String
Returns the current value of remote_account.
6 7 8 |
# File 'lib/nem/transaction/importance_transfer.rb', line 6 def remote_account @remote_account end |
Instance Method Details
#to_hash ⇒ Hash
attributes must be CAMEL CASE for NIS params
27 28 29 30 31 32 |
# File 'lib/nem/transaction/importance_transfer.rb', line 27 def to_hash { mode: parse_mode, remoteAccount: remote_account } end |