New answers tagged


Here are two options: Using ethers.js - the example below uses a mnemonic ethers wallet documentation const ethers = require('ethers'); let mnemonic = "YOUR MNEMONIC"; let mnemonicWallet = ethers.Wallet.fromMnemonic(mnemonic); console.log(mnemonicWallet.privateKey); This doesn't seem to be included in web3, but has been added to the list of enhancements ...


You can also obtain it programmatically: const keythereum = require("keythereum"); console.log(keythereum.recover(yourPassword, yourJsonObject).toString("hex"));


Found my answer. On metamask, I can export private key of selected account Click on the threedots Click on Account details Click on export private key. It now ask you a password: it's the Metamask password. It's specific to metamask. Then it will show you the private key. Keep it absolutely private, do not share, do not save on cloud!

Top 50 recent answers are included