fix: private key strength should be 256 bits.
This commit is contained in:
parent
335905449f
commit
4cba95219d
@ -106,7 +106,7 @@ export function hexToBech32(hrp: string, hex?: string) {
|
||||
|
||||
export function generateBip39Entropy(mnemonic?: string): Uint8Array {
|
||||
try {
|
||||
const mn = mnemonic ?? bip39.generateMnemonic(wordlist);
|
||||
const mn = mnemonic ?? bip39.generateMnemonic(wordlist, 256);
|
||||
return bip39.mnemonicToEntropy(mn, wordlist);
|
||||
} catch (e) {
|
||||
throw new Error("INVALID MNEMONIC PHRASE");
|
||||
|
Loading…
Reference in New Issue
Block a user