import re
import sys, os, time
import optparse
+import platform
try:
import ecdsa
'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':
for k, v in config_options.items():
if v is None: config_options.pop(k)
+ # Wallet migration on Electrum 1.7
+ # Todo: In time we could remove this again
+ if platform.system() == "Windows":
+ util.check_windows_wallet_migration()
+
config = SimpleConfig(config_options)
wallet = Wallet(config)
#right GUI toolkit based the GUI command line option given
if cmd == 'gui':
pref_gui = config.get('gui','classic')
+
if pref_gui == 'gtk':
try:
import lib.gui as gui
s = gui.network_dialog()
if a =='create':
- wallet.new_seed(None)
- wallet.init_mpk( wallet.seed )
+ wallet.init_seed(None)
else:
# ask for seed and gap.
sg = gui.seed_dialog()
if not seed: exit()
wallet.gap_limit = gap
if len(seed) == 128:
- wallet.seed = None
+ wallet.seed = ''
wallet.master_public_key = seed
else:
- wallet.seed = str(seed)
- wallet.init_mpk( wallet.seed )
+ wallet.init_seed(str(seed))
# generate the first addresses, in case we are offline
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
wallet.save()
print_msg("Wallet saved in '%s'"%wallet.config.path)
else:
- wallet.new_seed(None)
- wallet.init_mpk( wallet.seed )
+ wallet.init_seed(None)
wallet.synchronize() # there is no wallet thread
wallet.save()
print_msg("Your wallet generation seed is: " + wallet.seed)