Installation & Setup
Version 1.x of bzx.js is compatible with Node.js 8.x on Windows and Linux platforms.
You can expect compatibility with Node.js 10.x soon.

Install

Since version 1.x of this package, we stick with Semantic Versioning 2.0.0, so we recommend you to import bzx.js with a caret ^ in the version number to take advantage of non-breaking bug fixes.
Using NPM: npm install @bzxnetwork/bzx.js --save
Using Yarn: yarn add @bzxnetwork/bzx.js

Setup

1
const Web3 = require("web3");
2
const { BZxJS } = require("@bzxnetwork/bzx.js");
3
4
const networkId = await web3.eth.net.getId();
5
const bzx = await new BZxJS(web3, { networkId });
Copied!
Last modified 2yr ago
Copy link
Contents
Install
Setup