function mnemonicToKeyPair(mnemonic, derivationPath, password) {
  const seed = bip39.mnemonicToSeedSync(mnemonic, password)
  const { privateKey, publicKey } = hdkey
    .fromMasterSeed(seed)
    .derive(derivationPath)
  return { privateKey, publicKey }
}
/**
 * Obtian a key pair from a BIP39 mnemonic phrase and following the supplied
 * derivation path. Optinally supply a password.
 *
 * @param {string} mnemonic The 12-words mnemonic phrase.
 * @param {string} derivationPath The derivation path to use. I.e. "m/44'...".
 * @param {string} [password] The mnemonic password.
 * @returns {KeyPair} The key pair.
 */
Obtian a key pair from a BIP39 mnemonic phrase and following the supplied
derivation path. Optinally supply a password.

@param {string} mnemonic The 12-words mnemonic phrase.
@param {string} derivationPath The derivation path to use.
Obtian a key pair from a BIP39 mnemonic phrase and following the supplied derivation path . Optinally supply a password . @param { string } mnemonic The 12 - words mnemonic phrase . @param { string } derivationPath The derivation path to use .
function mnemonicToKeyPair(mnemonic, derivationPath, password) {
  const seed = bip39.mnemonicToSeedSync(mnemonic, password)
  const { privateKey, publicKey } = hdkey
    .fromMasterSeed(seed)
    .derive(derivationPath)
  return { privateKey, publicKey }
}
function mnemonicToKeyPair ( mnemonic , derivationPath , password ) { const seed = bip39 . mnemonicToSeedSync ( mnemonic , password ) const { privateKey , publicKey } = hdkey . fromMasterSeed ( seed ) . derive ( derivationPath ) return { privateKey , publicKey } }
Obtian a key pair from a BIP39 mnemonic phrase and following the supplied
 derivation path.
Obtian a key pair from a BIP39 mnemonic phrase and following the supplied derivation path .