Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bitcoin/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import bitcoin
from bitcoin.core import COIN, lx, b2lx, CBlock, CTransaction, COutPoint, CTxOut
from bitcoin.core.script import CScript
from bitcoin.wallet import CBitcoinAddress
from bitcoin.wallet import CBitcoinAddress, CBitcoinSecret

DEFAULT_USER_AGENT = "AuthServiceProxy/0.1"

Expand Down Expand Up @@ -211,6 +211,14 @@ def __init__(self, service_url=None,
super(Proxy, self).__init__(service_url=service_url, service_port=service_port, btc_conf_file=btc_conf_file,
timeout=timeout,
**kwargs)

def dumpprivkey(self, addr):
"""Return the private key matching an address
"""
r = self._call('dumpprivkey', str(addr))

return CBitcoinSecret(r)

def getaccountaddress(self, account=None):
"""Return the current Bitcoin address for receiving payments to this account."""
r = self._call('getaccountaddress', account)
Expand Down