Via npm for Node.js
$ npm install swtc-lib // node.js and web app
$ npm install swtc-lib@next // try to keep up with [email protected] which introduces more dependancies
$ npm install swtc-lib@jcc // if you need to use jcc interfaces, just note that Wallet is added to exports
$ npm install swtc-lib@nativescript // mobile nativescript app, simplified one line configuration
const Wallet = require("swtc-lib").Wallet // cjs import
const Remote = require("swtc-lib").Remote // cjs import
or
import { Wallet, Remote } from "swtc-lib" // esm import
Build from the source and test
$ git clone https://github.com/swtcca/swtc-lib.git
$ cd swtc-lib; npm install
$ npm run build or npm run build:production (optional for static browser)
$ npm run test
Basic js lib to be used for interacting with jingtum blockchain network.
- Keep only one websocket connecttion to jingtum and handle exception
- Do transaction to jingtumd, and process response
- Subscribe events, include server, ledger, account and so on
- Get other information from jingtum
- For more information see
docs.md
- Developer resource http://developer.jingtum.com/