Class: Nem::Transaction::Base
- Inherits:
-
Object
- Object
- Nem::Transaction::Base
- Defined in:
- lib/nem/transaction/base.rb
Direct Known Subclasses
ImportanceTransfer, MosaicDefinitionCreation, MosaicSupplyChange, Multisig, MultisigAggregateModification, MultisigSignature, ProvisionNamespace, Transfer
Constant Summary collapse
- NETWORK =
{ testnet: 0x98 << 24, mainnet: 0x68 << 24, mijin: 0x60 << 24 }
Instance Attribute Summary collapse
-
#deadline ⇒ Integer
The current value of deadline.
-
#fee ⇒ Integer
The current value of fee.
-
#signature ⇒ String
The current value of signature.
-
#signer ⇒ String
The current value of signer.
-
#timestamp ⇒ Integer
The current value of timestamp.
-
#type ⇒ Integer
The current value of type.
Instance Method Summary collapse
- #network(hex: false) ⇒ Object
- #to_hash ⇒ Object
-
#version ⇒ Integer
it can be override by child class.
Instance Attribute Details
#deadline ⇒ Integer
Returns the current value of deadline.
9 10 11 |
# File 'lib/nem/transaction/base.rb', line 9 def deadline @deadline end |
#fee ⇒ Integer
Returns the current value of fee.
9 10 11 |
# File 'lib/nem/transaction/base.rb', line 9 def fee @fee end |
#signature ⇒ String
Returns the current value of signature.
9 10 11 |
# File 'lib/nem/transaction/base.rb', line 9 def signature @signature end |
#signer ⇒ String
Returns the current value of signer.
9 10 11 |
# File 'lib/nem/transaction/base.rb', line 9 def signer @signer end |
#timestamp ⇒ Integer
Returns the current value of timestamp.
9 10 11 |
# File 'lib/nem/transaction/base.rb', line 9 def @timestamp end |
#type ⇒ Integer
Returns the current value of type.
9 10 11 |
# File 'lib/nem/transaction/base.rb', line 9 def type @type end |
Instance Method Details
#network(hex: false) ⇒ Object
36 37 38 |
# File 'lib/nem/transaction/base.rb', line 36 def network(hex: false) hex ? NETWORK[@network] : @network end |
#to_hash ⇒ Object
46 47 48 |
# File 'lib/nem/transaction/base.rb', line 46 def to_hash raise NotImplementedError, "#{self.class}##{__method__} must be implemented." end |
#version ⇒ Integer
it can be override by child class
42 43 44 |
# File 'lib/nem/transaction/base.rb', line 42 def version network(hex: true) + 1 end |