Install
To install
npm install quras-js
quras-js lives in the NPM system under the organization Quras Dev.
npm install quras-js
quras-js supports 2 kinds of imports.
A default import will import the semantic version of quras. Use this if you are new or just want the whole package to use.
import QurasLib from 'quras-js' QurasLib.create.createContractTx(...args) const query = QurasLib.create.query()
import {rpc, tx} from 'quras-js' QurasLib.tx.createContractTx(...args) const query = new rpc.Query()
require
will need to specify which module do they want exactly: var quras-js = require('quras-js') // Semantic Style by using default import var Quras = quras-js.default const query = Quras.create.query() // Named imports are available too var wallet = quras-js.wallet var tx = quras-js.tx const account = new wallet.Account(privateKey)
<script src="./lib/browser.js">
The library will be available as a global variable QurasLib
. Similar to require
style, you will have the semantic style under default
and the rest of the named modules exposed at the same level.