Sha256: 54df57dc17745afffa785d6a28d4505914c0baa38cd1abede21fcc5a679930d1

Contents?: true

Size: 791 Bytes

Versions: 1

Compression:

Stored size: 791 Bytes

Contents

# frozen_string_literal: true
module Nano::NodeProxyHelper
  def account_containing_block(hash)
    block_account(hash: hash).account
  end

  def available
    available_supply.available
  end

  def krai_from(amount:)
    krai_from_raw(amount: amount).amount
  end

  def krai_to(amount:)
    krai_to_raw(amount: amount).amount
  end

  def mrai_from(amount:)
    mrai_from_raw(amount: amount).amount
  end

  def mrai_to(amount:)
    mrai_to_raw(amount: amount).amount
  end

  def pending_exists?(hash:)
    pending_exists(hash: hash).exists == 1
  end

  def rai_from(amount:)
    rai_from_raw(amount: amount).amount
  end

  def rai_to(amount:)
    rai_to_raw(amount: amount).amount
  end

  def work_valid?(work:, hash:)
    work_validate(work: work, hash: hash).valid == 1
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nano_rpc-0.1.0 lib/nano/helpers/node_proxy_helper.rb