deprecate dumpprivkeys
This commit is contained in:
2
electrum
2
electrum
@@ -283,7 +283,7 @@ def run_cmdline(config):
|
|||||||
always_hook('cmdline_load_wallet', wallet)
|
always_hook('cmdline_load_wallet', wallet)
|
||||||
|
|
||||||
# important warning
|
# important warning
|
||||||
if cmd.name in ['getprivatekeys', 'dumpprivkeys']:
|
if cmd.name in ['getprivatekeys']:
|
||||||
print_stderr("WARNING: ALL your private keys are secret.")
|
print_stderr("WARNING: ALL your private keys are secret.")
|
||||||
print_stderr("Exposing a single private key can compromise your entire wallet!")
|
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.")
|
print_stderr("In particular, DO NOT use 'redeem private key' services proposed by third parties.")
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ class Commands:
|
|||||||
|
|
||||||
@command('wp')
|
@command('wp')
|
||||||
def getprivatekeys(self, address):
|
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
|
is_list = type(address) is list
|
||||||
domain = address if is_list else [address]
|
domain = address if is_list else [address]
|
||||||
out = [self.wallet.get_private_key(address, self.password) for address in domain]
|
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"""
|
"""Check if address is in wallet. Return true if and only address is in wallet"""
|
||||||
return self.wallet.is_mine(address)
|
return self.wallet.is_mine(address)
|
||||||
|
|
||||||
@command('wp')
|
@command('')
|
||||||
def dumpprivkeys(self):
|
def dumpprivkeys(self):
|
||||||
"""Dump private keys from your wallet"""
|
"""Deprecated."""
|
||||||
domain = self.wallet.addresses(True)
|
return "This command is deprecated. Use a pipe instead: 'electrum listaddresses | electrum getprivatekeys - '"
|
||||||
return [self.wallet.get_private_key(address, self.password) for address in domain]
|
|
||||||
|
|
||||||
@command('')
|
@command('')
|
||||||
def validateaddress(self, address):
|
def validateaddress(self, address):
|
||||||
|
|||||||
Reference in New Issue
Block a user