1
0

commands: change API of "make_seed" and "create" commands

instead of "segwit" boolean, take a "seed_type" optional arg
default seed_type to "segwit"
previously these commands created legacy seeds by defalt
This commit is contained in:
SomberNight
2019-08-09 22:02:01 +02:00
parent 0ec9f79402
commit 1c75d939d9
6 changed files with 11 additions and 11 deletions

View File

@@ -160,7 +160,9 @@ class Mnemonic(Logger):
i = i*n + k
return i
def make_seed(self, seed_type='standard', num_bits=132):
def make_seed(self, seed_type=None, *, num_bits=132):
if seed_type is None:
seed_type = 'segwit'
prefix = version.seed_prefix(seed_type)
# increase num_bits in order to obtain a uniform distribution for the last word
bpw = math.log(len(self.wordlist), 2)