|
|
@ -132,7 +132,7 @@ class Commands: |
|
|
|
return ' '.join(sorted(known_commands.keys())) |
|
|
|
|
|
|
|
@command('') |
|
|
|
def create(self, passphrase=None, password=None, encrypt_file=True, segwit=False): |
|
|
|
def create(self, passphrase=None, password=None, encrypt_file=True, seed_type=None): |
|
|
|
"""Create a new wallet. |
|
|
|
If you want to be prompted for an argument, type '?' or ':' (concealed) |
|
|
|
""" |
|
|
@ -140,7 +140,7 @@ class Commands: |
|
|
|
passphrase=passphrase, |
|
|
|
password=password, |
|
|
|
encrypt_file=encrypt_file, |
|
|
|
segwit=segwit) |
|
|
|
seed_type=seed_type) |
|
|
|
return { |
|
|
|
'seed': d['seed'], |
|
|
|
'path': d['wallet'].storage.path, |
|
|
@ -203,11 +203,10 @@ class Commands: |
|
|
|
return True |
|
|
|
|
|
|
|
@command('') |
|
|
|
def make_seed(self, nbits=132, language=None, segwit=False): |
|
|
|
def make_seed(self, nbits=132, language=None, seed_type=None): |
|
|
|
"""Create a seed""" |
|
|
|
from .mnemonic import Mnemonic |
|
|
|
t = 'segwit' if segwit else 'standard' |
|
|
|
s = Mnemonic(language).make_seed(t, nbits) |
|
|
|
s = Mnemonic(language).make_seed(seed_type, num_bits=nbits) |
|
|
|
return s |
|
|
|
|
|
|
|
@command('n') |
|
|
@ -810,7 +809,7 @@ command_options = { |
|
|
|
'from_addr': ("-F", "Source address (must be a wallet address; use sweep to spend from non-wallet address)."), |
|
|
|
'change_addr': ("-c", "Change address. Default is a spare address, or the source address if it's not in the wallet"), |
|
|
|
'nbits': (None, "Number of bits of entropy"), |
|
|
|
'segwit': (None, "Create segwit seed"), |
|
|
|
'seed_type': (None, "The type of seed to create, e.g. 'standard' or 'segwit'"), |
|
|
|
'language': ("-L", "Default language for wordlist"), |
|
|
|
'passphrase': (None, "Seed extension"), |
|
|
|
'privkey': (None, "Private key. Set to '?' to get a prompt."), |
|
|
|