module NanoRpc::NodeHelper

Public Instance Methods

account(address) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 9
def account(address)
  NanoRpc::Account.new(address, node: self)
end
account_containing_block(hash:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 5
def account_containing_block(hash:)
  block_account(hash: hash).account
end
accounts(addresses) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 13
def accounts(addresses)
  NanoRpc::Accounts.new(addresses, node: self)
end
clear_stats() click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 17
def clear_stats
  stats_clear.success == ''
end
create_wallet(seed: nil) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 21
def create_wallet(seed: nil)
  NanoRpc::Wallet.new(wallet_create(seed: seed).wallet, node: self)
end
knano_from_raw(amount:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 25
def knano_from_raw(amount:)
  krai_from_raw(amount: amount).amount
end
knano_to_raw(amount:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 29
def knano_to_raw(amount:)
  krai_to_raw(amount: amount).amount
end
mnano_from_raw(amount:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 33
def mnano_from_raw(amount:)
  mrai_from_raw(amount: amount).amount
end
mnano_to_raw(amount:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 37
def mnano_to_raw(amount:)
  mrai_to_raw(amount: amount).amount
end
nano_from_raw(amount:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 41
def nano_from_raw(amount:)
  rai_from_raw(amount: amount).amount
end
nano_to_raw(amount:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 45
def nano_to_raw(amount:)
  rai_to_raw(amount: amount).amount
end
num_frontiers() click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 49
def num_frontiers
  frontier_count['count']
end
pending_exists?(hash:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 53
def pending_exists?(hash:)
  pending_exists(hash: hash).exists == 1
end
total_supply() click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 57
def total_supply
  available_supply.available
end
wallet(id) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 61
def wallet(id)
  NanoRpc::Wallet.new(id, node: self)
end
work_valid?(work:, hash:) click to toggle source
# File lib/nano_rpc/helpers/node_helper.rb, line 65
def work_valid?(work:, hash:)
  work_validate(work: work, hash: hash).valid == 1
end