0
console.log('mnemonic: ' + mnemonic)
console.log('mnemonic: ' + mnemonic)
const seed = bip39.mnemonicToSeed(mnemonic)
const m = bip32.fromSeedBuffer(seed)
const keyPair = m.derivePath("m/44'/144'/0'/0/0").keyPair.getKeyPairs()
const key = ripple.KeyPair.from_json(keyPair.privateKey.substring(2))
var privateKey =key.to_pri_string();
var address=key.to_address_string();
console.log("private Key   "+keyPair.privateKey)
console.log('privateKeyWif: ' +privateKey ) // to_wif
console.log('publicKey: ' + keyPair.publicKey)
console.log("address   " +address)

put on hold as off-topic by Andrew Chow 18 hours ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about cryptocurrencies or projects that are not Bitcoin, and are not applicable to Bitcoin, are off-topic. For more information, see this meta-discussion." – Andrew Chow
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Be aware that Ripple had a little Not-invented-Here (NIH) and decided to re-invent base58-check encoding and decoding, no real value added just a pain in the... Also believe Ripple migrated from secp256k to ed25519 elliptic curves. – skaht Apr 2 at 1:45