Connex Driver for NodeJS
It drives Connex Framework to work in NodeJS environment. Now you can use Connex in NodeJS backend project.
Installation
npm i @vechain/connex-framework @vechain/connex.driver-nodejs
Usage
The REPL playground is a good start.
import { Framework } from '@vechain/connex-framework'
import { Driver, SimpleNet, SimpleWallet } from '@vechain/connex.driver-nodejs'
const wallet = new SimpleWallet()
wallet.import('<private key>')
const driver = await Driver.connect(new SimpleNet('http://localhost:8669/'), wallet)
const connex = new Framework(driver)
...
driver.txParams.expiration = 18
driver.txParams.gasPriceCoef = 128
driver.onTxCommit = txObj => {
}