Closed rachna-khatnawlia closed 1 year ago
Found Solution for this issue:
const createWallet = async (mnemonic, network) => { const { Account, Utils } = require("xrpl-secret-numbers"); const bip39 = require("bip39"); try { const entropy = bip39.mnemonicToEntropy(mnemonic); const entropyBytes = Buffer.from(entropy, "hex"); // console.log(entropy, entropyBytes, "entropy"); const secret = Utils.entropyToSecret(entropyBytes); // console.log(secret, "secret"); const account = new Account(secret); // console.log(account, "account xrp"); } catch (error) { console.log(error, "error in wallet creation"); } };
How can we generate wallet on the basis of mnemonic provided in this SDK?