commit fa9ce51685dda32b2e78444d8414946f6f0f8b93
parent 02e81a365522912ee4766529677cc8b02ce45b0e
Author: ThomasV <thomasv@gitorious>
Date: Sun, 16 Aug 2015 16:30:55 +0200
deprecate dumpprivkeys
Diffstat:
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/electrum b/electrum
@@ -283,7 +283,7 @@ def run_cmdline(config):
always_hook('cmdline_load_wallet', wallet)
# important warning
- if cmd.name in ['getprivatekeys', 'dumpprivkeys']:
+ if cmd.name in ['getprivatekeys']:
print_stderr("WARNING: ALL your private keys are secret.")
print_stderr("Exposing a single private key can compromise your entire wallet!")
print_stderr("In particular, DO NOT use 'redeem private key' services proposed by third parties.")
diff --git a/lib/commands.py b/lib/commands.py
@@ -239,7 +239,7 @@ class Commands:
@command('wp')
def getprivatekeys(self, address):
- """Get the private keys of a wallet address, or list of wallet addresses."""
+ """Get private keys of addresses. You may pass a single wallet address, or a list of wallet addresses."""
is_list = type(address) is list
domain = address if is_list else [address]
out = [self.wallet.get_private_key(address, self.password) for address in domain]
@@ -250,11 +250,10 @@ class Commands:
"""Check if address is in wallet. Return true if and only address is in wallet"""
return self.wallet.is_mine(address)
- @command('wp')
+ @command('')
def dumpprivkeys(self):
- """Dump private keys from your wallet"""
- domain = self.wallet.addresses(True)
- return [self.wallet.get_private_key(address, self.password) for address in domain]
+ """Deprecated."""
+ return "This command is deprecated. Use a pipe instead: 'electrum listaddresses | electrum getprivatekeys - '"
@command('')
def validateaddress(self, address):