Module: Etherlite::Api::Node
Instance Method Summary collapse
- #account_from_pk(_pk) ⇒ Object
- #accounts ⇒ Object
- #default_account ⇒ Object
- #get_block_number ⇒ Object
- #get_gas_price ⇒ Object
- #register_account(_passphrase) ⇒ Object
Methods included from Address
Instance Method Details
#account_from_pk(_pk) ⇒ Object
30 31 32 |
# File 'lib/etherlite/api/node.rb', line 30 def account_from_pk(_pk) Etherlite::Account::PrivateKey.new connection, _pk end |
#accounts ⇒ Object
20 21 22 23 24 |
# File 'lib/etherlite/api/node.rb', line 20 def accounts connection.ipc_call(:eth_accounts).map do |address| Etherlite::Account::Local.new @connection, Etherlite::Utils.normalize_address(address) end end |
#default_account ⇒ Object
26 27 28 |
# File 'lib/etherlite/api/node.rb', line 26 def default_account @default_account ||= load_default_account end |
#get_block_number ⇒ Object
7 8 9 |
# File 'lib/etherlite/api/node.rb', line 7 def get_block_number connection.eth_block_number end |
#get_gas_price ⇒ Object
11 12 13 |
# File 'lib/etherlite/api/node.rb', line 11 def get_gas_price connection.eth_gas_price end |