Class: NanoRpc::Wallet

Inherits:
Object
  • Object
show all
Includes:
Proxy, WalletHelper, WalletMethods
Defined in:
lib/nano_rpc/wallet.rb

Instance Attribute Summary collapse

Attributes included from Proxy

#node

Instance Method Summary collapse

Methods included from WalletMethods

#proxy_methods, #proxy_params

Methods included from WalletHelper

#account_work, #account_work_set, #accounts, #add_key, #add_watch, #balance, #balances, #begin_payment, #change_password, #change_seed, #contains?, #create_account, #create_accounts, #destroy, #enter_password, #export, #frontiers, #history, #init_payment, #ledger, #locked?, #move_accounts, #password_valid?, #pending_balance, #pending_balances, #pending_blocks, #receive_block, #remove_account, #representative, #representative_set, #republish, #send_nano, #work

Constructor Details

#initialize(id = nil, opts = {}) ⇒ Wallet

Returns a new instance of Wallet.



9
10
11
12
13
14
15
16
17
# File 'lib/nano_rpc/wallet.rb', line 9

def initialize(id = nil, opts = {})
  unless id.is_a?(String)
    raise NanoRpc::MissingParameters,
          'Missing argument: id (str)'
  end

  @id = id
  super(opts)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/nano_rpc/wallet.rb', line 7

def id
  @id
end

Instance Method Details

#inspectObject



19
20
21
# File 'lib/nano_rpc/wallet.rb', line 19

def inspect
  "#{inspect_prefix}, @id=\"#{@id}\">"
end