mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
fix make_seed arguments
This commit is contained in:
parent
679fc69cf1
commit
e30a179c97
2 changed files with 3 additions and 3 deletions
|
@ -149,10 +149,10 @@ class Commands:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@command('')
|
@command('')
|
||||||
def make_seed(self, nbits=128, entropy=1, language=None):
|
def make_seed(self, nbits=132, entropy=1, language=None):
|
||||||
"""Create a seed"""
|
"""Create a seed"""
|
||||||
from mnemonic import Mnemonic
|
from mnemonic import Mnemonic
|
||||||
s = Mnemonic(language).make_seed(nbits, custom_entropy=entropy)
|
s = Mnemonic(language).make_seed('standard', nbits, custom_entropy=entropy)
|
||||||
return s.encode('utf8')
|
return s.encode('utf8')
|
||||||
|
|
||||||
@command('')
|
@command('')
|
||||||
|
|
|
@ -159,7 +159,7 @@ class Mnemonic(object):
|
||||||
i = self.mnemonic_decode(seed)
|
i = self.mnemonic_decode(seed)
|
||||||
return i % custom_entropy == 0
|
return i % custom_entropy == 0
|
||||||
|
|
||||||
def make_seed(self, seed_type='standard', num_bits=128, custom_entropy=1):
|
def make_seed(self, seed_type='standard', num_bits=132, custom_entropy=1):
|
||||||
import version
|
import version
|
||||||
prefix = version.seed_prefix(seed_type)
|
prefix = version.seed_prefix(seed_type)
|
||||||
# increase num_bits in order to obtain a uniform distibution for the last word
|
# increase num_bits in order to obtain a uniform distibution for the last word
|
||||||
|
|
Loading…
Add table
Reference in a new issue