Hi how to get the privateKey after generate an account from Mnemonic #1487
francelwebdev
started this conversation in
General
Replies: 1 comment
-
Viem doesn't expose an API to extract private keys (for security reasons). You can rely on an external audited library, like import { HDKey } from '@scure/bip32'
import { mnemonicToSeedSync } from '@scure/bip39'
const seed = mnemonicToSeedSync("foo bar baz ...")
const { privateKey } = HDKey.fromMasterSeed(seed) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi how to get the privateKey after generate an account from Mnemonic
Beta Was this translation helpful? Give feedback.
All reactions