electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 0f5ab4c296b1f709890b73962c91ff09357f4788
parent b5401d2b5e71f45d1b24eea044658729b3bb08c1
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 11 Jan 2015 20:37:08 +0100

add ismine command. should fix issue #975

Diffstat:
Mlib/commands.py | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/commands.py b/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)