Class: Raiblocks::Wallet

Inherits:
Object
  • Object
show all
Includes:
Proxy, WalletProxyHelper
Defined in:
lib/raiblocks/proxies/wallet.rb

Instance Attribute Summary collapse

Attributes included from Proxy

#client

Instance Method Summary collapse

Methods included from WalletProxyHelper

#account_work, #account_work_set, #add, #balance, #balances, #begin_payment, #change_password, #change_seed, #contains?, #create, #destroy, #enter_password, #export, #frontiers, #init_payment, #locked?, #password_valid?, #pending_balance, #pending_blocks, #receive_block, #representative, #representative_set, #republish, #send_tx, #work

Methods included from Proxy

included, #methods, #proxy_methods

Constructor Details

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

Returns a new instance of Wallet.



8
9
10
11
12
13
14
15
16
# File 'lib/raiblocks/proxies/wallet.rb', line 8

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

  @seed = wallet_seed
  @client = opts[:client] || Raiblocks.client
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Raiblocks::Proxy

Instance Attribute Details

#seedObject

Returns the value of attribute seed.



6
7
8
# File 'lib/raiblocks/proxies/wallet.rb', line 6

def seed
  @seed
end