Class: RaiblocksRpc::Wallet
- Defined in:
- lib/raiblocks_rpc/proxies/wallet.rb
Instance Attribute Summary collapse
-
#seed ⇒ Object
Returns the value of attribute seed.
Attributes inherited from Proxy
Instance Method Summary collapse
-
#initialize(wallet_seed) ⇒ Wallet
constructor
A new instance of Wallet.
- #proxy_methods ⇒ Object
- #proxy_params ⇒ Object
Constructor Details
#initialize(wallet_seed) ⇒ Wallet
Returns a new instance of Wallet.
5 6 7 8 9 10 11 12 |
# File 'lib/raiblocks_rpc/proxies/wallet.rb', line 5 def initialize(wallet_seed) unless wallet_address.is_a?(String) || public_key.is_a?(Symbol) raise RaiblocksRpc::MissingArguments, 'Missing argument: wallet_seed (str)' end self.seed = wallet_seed end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RaiblocksRpc::Proxy
Instance Attribute Details
#seed ⇒ Object
Returns the value of attribute seed.
3 4 5 |
# File 'lib/raiblocks_rpc/proxies/wallet.rb', line 3 def seed @seed end |
Instance Method Details
#proxy_methods ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/raiblocks_rpc/proxies/wallet.rb', line 18 def proxy_methods { wallet_balances: nil, wallet_add: { required: i[key], optional: i[work] }, password_change: { required: i[password] }, wallet_change_seed: { required: i[seed] }, wallet_contains: { required: i[account] }, wallet_create: nil, wallet_destroy: nil, wallet_export: nil, wallet_frontiers: nil, wallet_locked: nil, password_enter: { required: i[password] }, wallet_pending: { required: i[count], optional: i[threshold source] }, wallet_republish: { required: i[count] }, wallet_balance_total: nil, password_valid: nil, wallet_work_get: nil, send: { required: %[wallet source destination amount] }, work_get: nil, work_set: nil, search_pending: nil, wallet_representative: nil, wallet_representative_set: i[representative], payment_begin: nil, payment_init: nil, payment_end: { required: i[account] }, receive: { required: i[account block] } } end |
#proxy_params ⇒ Object
14 15 16 |
# File 'lib/raiblocks_rpc/proxies/wallet.rb', line 14 def proxy_params { wallet: :seed } end |