module Web3::PersonalCalls
Public Instance Methods
See github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_ecrecover
# File personal_calls.rb, line 50 def personal_ecRecover(message, signature) response = do_request("personal_ecRecover",[message, signature]) response["result"] end
See github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_importrawkey
# File personal_calls.rb, line 10 def personal_importRawKey(key, passphrase) response = do_request("personal_importRawKey",[key, passphrase]) response["result"] end
See github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_listaccounts
# File personal_calls.rb, line 4 def personal_listAccounts() response = do_request("personal_listAccounts") response["result"] end
See github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_lockaccount
# File personal_calls.rb, line 28 def personal_lockAccount(account) response = do_request("personal_lockAccount",[account]) response["result"] end
See github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_newaccount
# File personal_calls.rb, line 16 def personal_newAccount(password) response = do_request("personal_newAccount",[password]) response["result"] end
See github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_sign
# File personal_calls.rb, line 44 def personal_sign(message, account, password) response = do_request("personal_sign",[message, account, password]) response["result"] end
See github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_signandsendtransaction
# File personal_calls.rb, line 22 def personal_signAndSendTransaction(transaction, passphrase) response = do_request("personal_signAndSendTransaction",[transaction, passphrase]) response["result"] end
Be careful with this method. Do not leave an account unlocked, as that creates an opportunity for an attacker to make transactions from that account. In general #personal_signAndSendTransaction is a better option than unlock -> send -> lock See github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_unlockaccount
# File personal_calls.rb, line 38 def personal_unlockAccount(account, passphrase, duration) response = do_request("personal_unlockAccount",[account, passphrase, duration]) response["result"] end