bcu

0.1.6 • Public • Published

Dapp-core

Disclaimer: Do not download and use. This is not a production ready library. When it is done, it will be announced. Furthermore, while it currently uses web3 it will be phased out and replaced with the ErisDB javascript API (a node.js replacement for go-decerver). I can not guarantee that compatibility with web3 will be retained. In fact it probably won't.

This library, aka Blockchain Utilities or just bcu is designed to make remote calls to blockchain clients simple, safe and reliable. There are also tools for fast dapp prototyping and automatic testing of contract suites.

This library is decoupled from any blockchain API. You have to pass the API in (web3 only atm.). This is a feature.

Components

bcu is the main library. It keeps references to all the others.

bcu.abiGenerator: Automation tool. Used to read non-intrusive json annotations in solidity contracts. These may be things like whether a function is an accessor or not, if a function should be exported to the javascript contract/utilities, and if a function is tied to a certain (named) event.

bcu.contracts: Various different tools for working with contracts, such as generic linked-list readers and interceptors that takes out-data and converts it into a object with named fields.

bcu.Deployer: Powerful tool for automatic deployment, post-deploy transacting and automatic testing of contract suites.

bcu.ipfs: Object that interacts with a running ipfs daemon by making requests to the http server. It's a substitute until node-ipfs is ready.

bcu.jsonRpcGen: Adds an endpoint to an Express router so that contracts can be rpc'ed directly. Protocol is json-rpc 2.0. Useful with the widget generator.

bcu.logger: A winston logger instance used internally (globally within dapp-core), but is exported if anyone wants to use it.

bcu.smath: Library for doing hex/decimal-string arithmetic.

bcu.util: Some utility functions, such as checking if a string is a proper hex string prepended with '0x'.

bcu.widgetGen: Generates a simple .html document from a contract json ABI. Each functions input and output is mapped to text/static fields and a button is available to do calls. The calls are done to a provided endpoint using json-rpc 2.0.

Package Sidebar

Install

npm i bcu

Weekly Downloads

6

Version

0.1.6

License

LGPL-3.0

Last publish

Collaborators

  • androlol