Skip to content

Commit 6a0a2b9

Browse files
committed
Add sendmany to RPC
1 parent c43c852 commit 6a0a2b9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

bitcoin/rpc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,12 @@ def sendrawtransaction(self, tx, allowhighfees=False):
429429
r = self._call('sendrawtransaction', hextx)
430430
return lx(r)
431431

432+
def sendmany(self, fromaccount, payments, minconf=1, comment=''):
433+
"""Sent amount to a given address"""
434+
json_payments = {str(addr):float(amount)/COIN for addr,amount in payments.items()}
435+
r = self._call('sendmany', fromaccount, json_payments, minconf, comment)
436+
return lx(r)
437+
432438
def sendtoaddress(self, addr, amount):
433439
"""Sent amount to a given address"""
434440
addr = str(addr)

0 commit comments

Comments
 (0)