Class: Nem::Transaction::ProvisionNamespace
- Defined in:
- lib/nem/transaction/provision_namespace.rb
Constant Summary collapse
- TYPE =
8193 (provision namespace transaction)
0x2001
Constants inherited from Base
Instance Attribute Summary collapse
-
#new_part ⇒ Object
readonly
Returns the value of attribute new_part.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#rental_fee ⇒ Object
readonly
Returns the value of attribute rental_fee.
-
#rental_fee_sink ⇒ Object
readonly
Returns the value of attribute rental_fee_sink.
Attributes inherited from Base
#deadline, #fee, #signature, #signer, #timestamp, #type
Instance Method Summary collapse
-
#initialize(new_part, parent = nil, network: nil) ⇒ ProvisionNamespace
constructor
A new instance of ProvisionNamespace.
- #root? ⇒ Boolean
- #sub? ⇒ Boolean
-
#to_hash ⇒ Object
attributes must be CAMEL CASE for NIS params.
Methods inherited from Base
Constructor Details
#initialize(new_part, parent = nil, network: nil) ⇒ ProvisionNamespace
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nem/transaction/provision_namespace.rb', line 12 def initialize(new_part, parent = nil, network: nil) @new_part = new_part @parent = parent @rental_fee = rental[:fee] @rental_fee_sink = rental[:sink] @network = network || Nem.default_network @type = TYPE @fee = Nem::Fee::ProvisionNamespace.new(self) end |
Instance Attribute Details
#new_part ⇒ Object (readonly)
Returns the value of attribute new_part.
6 7 8 |
# File 'lib/nem/transaction/provision_namespace.rb', line 6 def new_part @new_part end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
6 7 8 |
# File 'lib/nem/transaction/provision_namespace.rb', line 6 def parent @parent end |
#rental_fee ⇒ Object (readonly)
Returns the value of attribute rental_fee.
6 7 8 |
# File 'lib/nem/transaction/provision_namespace.rb', line 6 def rental_fee @rental_fee end |
#rental_fee_sink ⇒ Object (readonly)
Returns the value of attribute rental_fee_sink.
6 7 8 |
# File 'lib/nem/transaction/provision_namespace.rb', line 6 def rental_fee_sink @rental_fee_sink end |
Instance Method Details
#root? ⇒ Boolean
23 24 25 |
# File 'lib/nem/transaction/provision_namespace.rb', line 23 def root? !!(@parent == nil) end |
#sub? ⇒ Boolean
27 28 29 |
# File 'lib/nem/transaction/provision_namespace.rb', line 27 def sub? !!(@parent && @new_part) end |
#to_hash ⇒ Object
attributes must be CAMEL CASE for NIS params
32 33 34 35 36 37 38 39 |
# File 'lib/nem/transaction/provision_namespace.rb', line 32 def to_hash { newPart: new_part, parent: parent, rentalFeeSink: rental_fee_sink, rentalFee: rental_fee } end |