Guest User

Untitled

a guest
Jul 21st, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. const bip39 = require('bip39');
  2. const hdkey = require('ethereumjs-wallet/hdkey');
  3.  
  4. const mnemonic = '..';
  5. const hdwallet = hdkey.fromMasterSeed(bip39.mnemonicToSeed(mnemonic));
  6. const path = "m/44'/60'/0'/0/0";
  7. const wallet = hdwallet.derivePath(path).getWallet();
  8. const address = `0x${wallet.getAddress().toString('hex')}`;
  9.  
  10. console.log(`Address: ${address}`);
Add Comment
Please, Sign In to add comment