fix: private key strength should be 256 bits.

This commit is contained in:
Susumu OTA 2023-03-13 11:13:56 +09:00 committed by Kieran
parent b045e6260c
commit cd89da39dd
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
1 changed files with 1 additions and 1 deletions

View File

@ -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");