Browse Source

add ismine command. should fix issue #975

283
ThomasV 10 years ago
parent
commit
0f5ab4c296
  1. 4
      lib/commands.py

4
lib/commands.py

@ -84,6 +84,7 @@ register_command('getmpk', 0, 0, False, True, False, 'Return your
register_command('help', 0, 1, False, False, False, 'Prints this help')
register_command('history', 0, 0, True, True, False, 'Returns the transaction history of your wallet')
register_command('importprivkey', 1, 1, False, True, True, 'Import a private key', 'importprivkey <privatekey>')
register_command('ismine', 1, 1, False, True, False, 'Return true if and only if address is in wallet', 'ismine <address'>)
register_command('listaddresses', 2, 2, False, True, False, 'Returns your list of addresses.', '', listaddr_options)
register_command('listunspent', 0, 0, True, True, False, 'Returns the list of unspent inputs in your wallet.')
register_command('getaddressunspent', 1, 1, True, False, False, 'Returns the list of unspent inputs for an address.')
@ -208,6 +209,9 @@ class Commands:
def getprivatekeys(self, addr):
return self.wallet.get_private_key(addr, self.password)
def ismine(self, addr):
return self.wallet.is_mine(addr)
def dumpprivkeys(self, addresses = None):
if addresses is None:
addresses = self.wallet.addresses(True)

Loading…
Cancel
Save