Class: Nem::Transaction::MosaicDefinitionCreation
- Defined in:
- lib/nem/transaction/mosaic_definition_creation.rb
Overview
Constant Summary collapse
- TYPE =
16385 (mosaic definition creation transaction)
0x4001
Constants inherited from Base
Instance Attribute Summary collapse
-
#creation_fee ⇒ Integer
The current value of creation_fee.
-
#creation_fee_sink ⇒ Integer
The current value of creation_fee_sink.
-
#mosaic_definition ⇒ Nem::Model::MosaicDefinition
The current value of mosaic_definition.
Attributes inherited from Base
#deadline, #fee, #signature, #signer, #timestamp, #type
Instance Method Summary collapse
-
#initialize(mosaic_definition, timestamp: nil, deadline: nil, network: nil) ⇒ MosaicDefinitionCreation
constructor
A new instance of MosaicDefinitionCreation.
-
#to_hash ⇒ Hash
attributes must be CAMEL CASE for NIS params.
Methods inherited from Base
Constructor Details
#initialize(mosaic_definition, timestamp: nil, deadline: nil, network: nil) ⇒ MosaicDefinitionCreation
Returns a new instance of MosaicDefinitionCreation.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/nem/transaction/mosaic_definition_creation.rb', line 12 def initialize(mosaic_definition, timestamp: nil, deadline: nil, network: nil) @mosaic_definition = mosaic_definition @creation_fee = creation[:fee] @creation_fee_sink = creation[:sink] @network = network || Nem.default_network @type = TYPE @fee = Nem::Fee::MosaicDefinitionCreation.new(self) @timestamp = || Time.now @deadline = deadline || Time.now + Nem.default_deadline end |
Instance Attribute Details
#creation_fee ⇒ Integer
Returns the current value of creation_fee.
7 8 9 |
# File 'lib/nem/transaction/mosaic_definition_creation.rb', line 7 def creation_fee @creation_fee end |
#creation_fee_sink ⇒ Integer
Returns the current value of creation_fee_sink.
7 8 9 |
# File 'lib/nem/transaction/mosaic_definition_creation.rb', line 7 def creation_fee_sink @creation_fee_sink end |
#mosaic_definition ⇒ Nem::Model::MosaicDefinition
Returns the current value of mosaic_definition.
7 8 9 |
# File 'lib/nem/transaction/mosaic_definition_creation.rb', line 7 def mosaic_definition @mosaic_definition end |
Instance Method Details
#to_hash ⇒ Hash
attributes must be CAMEL CASE for NIS params
26 27 28 29 30 31 32 |
# File 'lib/nem/transaction/mosaic_definition_creation.rb', line 26 def to_hash { mosaicDefinition: mosaic_definition.to_hash, creationFee: creation_fee, creationFeeSink: creation_fee_sink, } end |