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 ⇒ Object
readonly
Returns the value of attribute deadline.
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
-
#signer ⇒ Object
readonly
Returns the value of attribute signer.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #network(hex: false) ⇒ Object
- #to_hash ⇒ Object
-
#version ⇒ Object
it can be override by child class.
Instance Attribute Details
#deadline ⇒ Object (readonly)
Returns the value of attribute deadline.
4 5 6 |
# File 'lib/nem/transaction/base.rb', line 4 def deadline @deadline end |
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
4 5 6 |
# File 'lib/nem/transaction/base.rb', line 4 def fee @fee end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
4 5 6 |
# File 'lib/nem/transaction/base.rb', line 4 def signature @signature end |
#signer ⇒ Object (readonly)
Returns the value of attribute signer.
4 5 6 |
# File 'lib/nem/transaction/base.rb', line 4 def signer @signer end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
4 5 6 |
# File 'lib/nem/transaction/base.rb', line 4 def @timestamp end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/nem/transaction/base.rb', line 4 def type @type end |
Instance Method Details
#network(hex: false) ⇒ Object
31 32 33 |
# File 'lib/nem/transaction/base.rb', line 31 def network(hex: false) hex ? NETWORK[@network] : @network end |
#to_hash ⇒ Object
40 41 42 |
# File 'lib/nem/transaction/base.rb', line 40 def to_hash raise 'it must be implemented by child class.' end |
#version ⇒ Object
it can be override by child class
36 37 38 |
# File 'lib/nem/transaction/base.rb', line 36 def version network(hex: true) + 1 end |