Open congminh090800 opened 3 years ago
same error
const bip39 = require("bip39");
const hdkey = require('hdkey');
const { Account, Crypto } = require('ontology-ts-sdk')
function ont(data) {
const mnemonic = data.mnemonic
const mnemonicPath = data.mnemonicPath
const seed = bip39.mnemonicToSeedSync(mnemonic);
const hdWallet = hdkey.fromMasterSeed(seed).derive("m/0'/0'/0'/" + mnemonicPath + "'");
const child = hdWallet._privateKey.toString('hex')
const privateKey = new Crypto.PrivateKey(child);
const account = Account.create(privateKey, '', 'account');
const WIF = privateKey.serializeWIF();
const address = account.address.toBase58()
return { address: address, privateKey: WIF }
}
module.exports = {
ont
}
@congminh090800 could you do anything about it since 2021? :))
I got this error right at the require step
Got stuck in this line:
Is there something new on curve function ?