Skip to content

Commit

Permalink
Add 'walletpassphrase' and 'walletlock' rpc calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Stranex authored and Timothy Stranex committed Aug 28, 2013
1 parent e282343 commit 97dbace
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/bitcoin/client.rb
Expand Up @@ -208,6 +208,19 @@ def verifymessage(bitcoinaddress, signature, message)
@api.request 'verifymessage', bitcoinaddress, signature, message
end

# Stores the wallet decryption key in memory for +timeout+ seconds.
def walletpassphrase(passphrase, timeout)
@api.request 'walletpassphrase', passphrase, timeout
end

# Removes the wallet encryption key from memory, locking the wallet.
# After calling this method, you will need to call walletpassphrase again
# before being able to call any methods which require the wallet to be
# unlocked.
def walletlock
@api.request 'walletlock'
end

alias account getaccount
alias account_address getaccountaddress
alias addresses_by_account getaddressesbyaccount
Expand Down

0 comments on commit 97dbace

Please sign in to comment.