Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
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
23 changes: 23 additions & 0 deletions 23 bitcoin/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@ def __init__(self, service_url=None,
timeout=timeout,
**kwargs)

def createrawtransaction(self, *args):
"""Get rawtransactions when provided vin and vout

FIXME: Implement options and accept outpoints instead of user args
"""
r = self._call('createrawtransaction', *args)
r = str(r)
tx = CTransaction.deserialize(unhexlify(r))
return tx

def dumpprivkey(self, addr):
"""Return the private key matching an address
"""
Expand Down Expand Up @@ -385,6 +395,19 @@ def gettxout(self, outpoint, includemempool=True):
r['bestblock'] = lx(r['bestblock'])
return r

def importaddress(self, addr, label=None, rescan=True):
"""Adds an address or pubkey to wallet without the associated privkey."""
addr = str(addr)

if label is not None:
if rescan:
r = self._call('importaddress', addr, label, True)
else:
r = self._call('importaddress', addr, label)
else:
r = self._call('importaddress', addr)
return r

def listunspent(self, minconf=0, maxconf=9999999, addrs=None):
"""Return unspent transaction outputs in wallet

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.