The Generation of Mnemonics
Blog iconKevinWang
Sep 14
MnemonicWe know that in MetaMask, when you generate a new account, you will get a set of mnemonics. This article will explain the process of generating mnemonics. Let’s see the code first.function genMnemonic() { const randomWallet = ethers.Wallet.createRandom(); const mnemonic = randomWallet.mnemonic.phrase; console.log(mnemonic); return mnemonic; } static createRandom(provider?: null | Provider): HDNodeWallet { const wallet = HDNodeWallet.createRandom(); if (provider) { return wallet.connec...

KevinWang

Written by
KevinWang
Subscribe

2025 Paragraph Technologies Inc

PopularTrendingPrivacyTermsHome
Search...Ctrl+K

KevinWang

Subscribe