register_command('listaddresses', 3, 3, False, True, 'Returns your list of addresses.', '', listaddr_options)
register_command('listunspent', 0, 0, False, True, 'Returns a list of unspent inputs in your wallet.')
register_command('mktx', 5, 5, True, True, 'Create a signed transaction', 'mktx <recipient> <amount> [label]', payto_options)
+ register_command('mksendmanytx', 4, 4, True, True, 'Create a signed transaction', 'mksendmanytx <recipient> <amount> [<recipient> <amount> ...]', payto_options)
register_command('payto', 5, 5, True, False, 'Create and broadcast a transaction.', "payto <recipient> <amount> [label]\n<recipient> can be a bitcoin address or a label", payto_options)
+ register_command('paytomany', 4, 4, True, False, 'Create and broadcast a transaction.', "paytomany <recipient> <amount> [<recipient> <amount> ...]\n<recipient> can be a bitcoin address or a label", payto_options)
register_command('password', 0, 0, True, True, 'Change your password')
register_command('prioritize', 1, 1, False, True, 'Coins at prioritized addresses are spent first.', 'prioritize <address>')
-register_command('restore', 0, 0, False, False, 'Restore a wallet')
-register_command('setconfig', 2, 2, False, True, 'Set a configuration variable', 'setconfig <name> <value>')
+register_command('restore', 0, 0, False, False, 'Restore a wallet', '', restore_options)
+register_command('setconfig', 2, 2, False, True, 'Set a configuration variable', 'setconfig <name> <value>', config_options)
register_command('setlabel', 2,-1, False, True, 'Assign a label to an item', 'setlabel <tx_hash> <label>')
register_command('sendrawtransaction', 1, 1, False, False, 'Broadcasts a transaction to the network.', 'sendrawtransaction <tx in hexadecimal>')
register_command('signrawtransaction', 1, 3, True, True, 'similar to bitcoind\'s command')
def verifymessage(self, address, signature, message):
- try:
- EC_KEY.verify_message(address, signature, message)
- return True
- except BaseException as e:
- print_error("Verification error: {0}".format(e))
- return False
+ return self.wallet.verify_message(address, signature, message)
- def _mktx(self, to_address, amount, fee = None, change_addr = None, domain = None):
+ def _mktx(self, outputs, fee = None, change_addr = None, domain = None):
- if not is_valid(to_address):
- raise BaseException("Invalid Bitcoin address", to_address)
+ for to_address, amount in outputs:
+ if not is_valid(to_address):
+ raise BaseException("Invalid Bitcoin address", to_address)
if change_addr:
if not is_valid(change_addr):