boxd-js
By Contentbox
A javascript API for integration with boxd-based blockchain using Boxd RPC API on nodejs or browser.
Documentation can be found here.
Installation
NPM
The official distribution package can be found at npm.
Add dependency to your project
npm i boxdjs
Browser Distribution
Clone this repository locally then run npm run build:node
. The browser distribution will be located in dist
and can be directly copied into your project repository. The dist
folder contains minified bundles ready for production, along with source mapped versions of the library for debugging.
Import
ES Modules
Supported using TypeScript, webpack, or Node.js with --experimental-modules
flag
import boxdjs from "boxdjs";
import { Account, AccountManager, Api, Feature, Contract, Util } from "boxdjs";
CommonJS
Importing using commonJS syntax is supported by Node.js out of the box.
const boxdjs = require("boxdjs").default;
Setup
Build (nodejs & browser)
npm run build
Test (Jest)
npm run test
Project Structure
.
âââ boxdjs-script
âââ dist
â  âââ boxd
â  âââ browser.js
â  âââ index.js
âââ package
â  âââ boxd
â  â  âââ account
â  â  â  âââ account-manager.ts
â  â  â  âââ account.ts
â  â  âââ core
â  â  â  âââ token
â  â  â  âââ block
â  â  â  âââ contract
â  â  â  âââ tx
â  â  â  âââ split
â  â  â  âââ api.ts
â  â  â  âââ feature.ts
â  â  âââ util
â  âââ browser.ts
â  âââ index.ts
âââ static
â  âââ json
â  â  âââ keystore.json
â  â  âââ mock.json
â  âââ protobuf
âââ test
â  âââ a.faucet.test.ts
â  âââ b.account.test.ts
â  âââ b.util.test.ts
â  âââ core.abi.test.ts
â  âââ core.block.test.ts
â  âââ core.contract.test.ts
â  âââ core.split.test.ts
â  âââ core.token.test.ts
â  âââ core.tx.test.ts
â  âââ z.contract-test.js
â  âââ z.rpc-test.ts
âââ .babelrc
âââ .prettierrc
âââ .eslintrc.json
âââ .gitignore
âââ tsconfig.json
âââ gulpfile.js
âââ package-lock.json
âââ package.json
âââ LICENSE
âââ README.md
âââ types
âââ index.d.ts
License
MIT