Class: Etherlite::Account::Local

Inherits:
Base
  • Object
show all
Defined in:
lib/etherlite/account/local.rb

Instance Attribute Summary

Attributes inherited from Base

#connection, #normalized_address

Instance Method Summary collapse

Methods inherited from Base

#==, #call, #initialize, #next_nonce, #transfer_to

Methods included from Etherlite::Api::Address

#address, #get_balance

Constructor Details

This class inherits a constructor from Etherlite::Account::Base

Instance Method Details

#lockObject



8
9
10
# File 'lib/etherlite/account/local.rb', line 8

def lock
  @passphrase = nil
end

#send_transaction(_options = {}) ⇒ Object



12
13
14
15
16
17
# File 'lib/etherlite/account/local.rb', line 12

def send_transaction(_options = {})
  params = build_params_from_options _options
  passphrase = _options.fetch(:passphrase, @passphrase)

  Transaction.new @connection, send_transaction_with_passphrase(params, passphrase)
end

#unlock(_passphrase) ⇒ Object



4
5
6
# File 'lib/etherlite/account/local.rb', line 4

def unlock(_passphrase)
  @passphrase = _passphrase
end