class Nis::Transaction::ProvisionNamespace
@attr [String] newPart @attr [String] parent @attr [Integer] rentalFee @attr [String] rentalFeeSink @attr [Integer] type @attr [Integer] fee @attr [Integer] deadline @attr [Integer] timeStamp @attr [Integer] version @attr [String] signer @attr [String] signature @attr [Symbol] network @see nemproject.github.io/#provisionNamespaceTransaction
Constants
- TYPE
Attributes
deadline[RW]
fee[R]
network[RW]
newPart[RW]
new_part[RW]
new_part=[RW]
parent[RW]
rentalFee[RW]
rentalFeeSink[RW]
rental_fee[RW]
rental_fee=[RW]
rental_fee_sink[RW]
rental_fee_sink=[RW]
signature[RW]
signer[RW]
timeStamp[RW]
timestamp[RW]
type[R]
version[RW]
Public Class Methods
new(new_part, parent = nil, network: :testnet)
click to toggle source
# File lib/nis/transaction/provision_namespace.rb, line 33 def initialize(new_part, parent = nil, network: :testnet) @type = TYPE @network = network @newPart = new_part @parent = parent @rentalFee = rental[:fee] @rentalFeeSink = rental[:sink] @fee = Nis::Fee::ProvisionNamespace.new(self) end
Public Instance Methods
root?()
click to toggle source
# File lib/nis/transaction/provision_namespace.rb, line 45 def root? !!(@parent == nil) end
sub?()
click to toggle source
# File lib/nis/transaction/provision_namespace.rb, line 49 def sub? !!(@parent && @newPart) end
Private Instance Methods
rental()
click to toggle source
@see www.nem.ninja/docs/#namespaces
# File lib/nis/transaction/provision_namespace.rb, line 56 def rental if @network == :testnet if root? { fee: 100 * 1_000_000, sink: 'TAMESPACEWH4MKFMBCVFERDPOOP4FK7MTDJEYP35' } else { fee: 10 * 1_000_000, sink: 'TAMESPACEWH4MKFMBCVFERDPOOP4FK7MTDJEYP35' } end else if root? { fee: 100 * 1_000_000 , sink: 'NAMESPACEWH4MKFMBCVFERDPOOP4FK7MTBXDPZZA' } else { fee: 10 * 1_000_000 , sink: 'NAMESPACEWH4MKFMBCVFERDPOOP4FK7MTBXDPZZA' } end end end