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