sample code:
var Framework = require('@vechain/connex-framework')
var Driver, SimpleNet, SimpleWallet, options = require('@vechain/connex.driver-nodejs')
const wallet = new SimpleWallet()
wallet.import('.........') // here imported my testnet account private key
const driver = await Driver.connect(new SimpleNet('http://localhost:8669/'), wallet)
const connex = new Framework(driver)
// here get connex object ready to use
console.log(connex);
driver.txParams.expiration = 18
driver.txParams.gasPriceCoef = 128
driver.onTxCommit = txObj => {
//
}
Followed steps
I install all the modules.
I set the my testnet account private key.
I also tested in Vechain testnet also "https://sync-testnet.vechain.org".
Issue faced in above source code:
const wallet = new SimpleWallet()
^
TypeError: SimpleWallet is not a constructor
Kindly let me know, if I was missed anything, or any other procedure to follow.If anyone know,kindly help me
sample code: var Framework = require('@vechain/connex-framework') var Driver, SimpleNet, SimpleWallet, options = require('@vechain/connex.driver-nodejs') const wallet = new SimpleWallet() wallet.import('.........') // here imported my testnet account private key const driver = await Driver.connect(new SimpleNet('http://localhost:8669/'), wallet) const connex = new Framework(driver) // here get connex object ready to use console.log(connex);
driver.txParams.expiration = 18 driver.txParams.gasPriceCoef = 128 driver.onTxCommit = txObj => { // }
Followed steps I install all the modules. I set the my testnet account private key. I also tested in Vechain testnet also "https://sync-testnet.vechain.org".
Issue faced in above source code: const wallet = new SimpleWallet() ^ TypeError: SimpleWallet is not a constructor
Kindly let me know, if I was missed anything, or any other procedure to follow.If anyone know,kindly help me