Skip to content

Instantly share code, notes, and snippets.

@leonprou
Last active July 30, 2020 14:17
Show Gist options
  • Save leonprou/b0b370c24787d70055d33f14d8513d4f to your computer and use it in GitHub Desktop.
Save leonprou/b0b370c24787d70055d33f14d8513d4f to your computer and use it in GitHub Desktop.
Private key from mnemonic
require('ethereumjs-wallet/hdkey').fromMasterSeed(m).deriveChild(i).getWallet().getAddressString()
require('ethereumjs-wallet/hdkey').fromMasterSeed(m).deriveChild(i).getWallet().getPrivateKeyString()
for (let i = 0; i < 15; i++) {
console.log(`${i}: ${require('ethereumjs-wallet/hdkey').fromMasterSeed(m).deriveChild(i).getWallet().getAddressString()}`)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment