fix: private key strength should be 256 bits. #429

Closed
susumuota wants to merge 1 commits from fix-private-key-strength into main
Showing only changes of commit 4cba95219d - Show all commits

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