1
0

Extend Wallet Import Format with txin type. Extend class Imported_Wallet.

This commit is contained in:
ThomasV
2017-09-25 21:35:14 +02:00
parent 4864c802dd
commit e8b564c0e7
10 changed files with 243 additions and 161 deletions

View File

@@ -364,11 +364,11 @@ class Commands:
@command('wp')
def importprivkey(self, privkey, password=None):
"""Import a private key. """
"""Import a private key."""
if not self.wallet.can_import_privkey():
return "Error: This type of wallet cannot import private keys. Try to create a new wallet with that key."
try:
addr = self.wallet.import_key(privkey, password)
addr = self.wallet.import_private_key(privkey, password)
out = "Keypair imported: " + addr
except BaseException as e:
out = "Error: " + str(e)
@@ -687,6 +687,7 @@ param_descriptions = {
'amount': 'Amount to be sent (in BTC). Type \'!\' to send the maximum available.',
'requested_amount': 'Requested amount (in BTC).',
'outputs': 'list of ["address", amount]',
'redeem_script': 'redeem script (hexadecimal)',
}
command_options = {