'seed':
"Print the generation seed of your wallet.",
'importprivkey':
- 'Imports a key pair\nSyntax: import <address>:<privatekey>',
+ 'Import a private key\nSyntax: importprivkey <privatekey>',
'signmessage':
'Signs a message with a key\nSyntax: signmessage <address> <message>\nIf you want to lead or end a message with spaces, or want double spaces inside the message make sure you quote the string. I.e. " Hello This is a weird String "',
'verifymessage':
parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="show debugging information")
parser.add_option("-P", "--portable", action="store_true", dest="portable", default=False, help="portable wallet")
parser.add_option("-L", "--lang", dest="language", default=None, help="defaut language used in GUI")
+ parser.add_option("-u", "--usb", dest="bitkey", action="store_true", help="Turn on support for hardware wallets (EXPERIMENTAL)")
return parser
wallet.init_mpk( wallet.seed )
else:
# ask for seed and gap.
- if not gui.seed_dialog(): exit()
- wallet.init_mpk( wallet.seed )
+ sg = gui.seed_dialog()
+ if not sg: exit()
+ seed, gap = sg
+ if not seed: exit()
+ wallet.gap_limit = gap
+ if len(seed) == 128:
+ wallet.seed = None
+ wallet.master_public_key = seed
+ else:
+ wallet.seed = str(seed)
+ wallet.init_mpk( wallet.seed )
+
# generate the first addresses, in case we are offline
if s is None or a == 'create':
if not seed:
sys.exit("Error: No seed")
- wallet.seed = str(seed)
- wallet.init_mpk( wallet.seed )
- if not options.offline:
+ if len(seed) == 128:
+ wallet.seed = None
+ wallet.master_public_key = seed
+ else:
+ wallet.seed = str(seed)
+ wallet.init_mpk( wallet.seed )
+ if not options.offline:
interface = Interface(config)
interface.start()
wallet.interface = interface
exit(1)
# check password
try:
- wallet.pw_decode( wallet.seed, password)
+ seed = wallet.decode_seed(password)
except:
print_msg("Error: This password does not decode this wallet.")
exit(1)
else:
password = None
+ seed = wallet.seed
if cmd == 'importprivkey':
# See if they specificed a key on the cmd line, if not prompt
print_msg(known_commands[cmd2])
elif cmd == 'seed':
- seed = wallet.pw_decode( wallet.seed, password)
print_msg(seed + ' "' + ' '.join(mnemonic_encode(seed)) + '"')
elif cmd == 'deseed':
print_msg(h)
elif cmd == 'password':
- try:
- seed = wallet.pw_decode( wallet.seed, password)
- except ValueError:
- sys.exit("Error: Password does not decrypt this wallet.")
-
new_password = prompt_password('New password:')
wallet.update_password(seed, password, new_password)