Skip to content

Commit 0c6d484

Browse files
authored
Merge pull request petertodd#211 from cisba/signrawtransactionwithwallet
added rpc call signrawtransactionwithwallet
2 parents 763e728 + 59a4276 commit 0c6d484

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bitcoin/rpc.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,18 @@ def signrawtransaction(self, tx, *args):
719719
del r['hex']
720720
return r
721721

722+
def signrawtransactionwithwallet(self, tx, *args):
723+
"""Sign inputs for transaction
724+
bicoincore >= 0.17.x
725+
726+
FIXME: implement options
727+
"""
728+
hextx = hexlify(tx.serialize())
729+
r = self._call('signrawtransactionwithwallet', hextx, *args)
730+
r['tx'] = CTransaction.deserialize(unhexlify(r['hex']))
731+
del r['hex']
732+
return r
733+
722734
def submitblock(self, block, params=None):
723735
"""Submit a new block to the network.
724736

0 commit comments

Comments
 (0)