4.0.0 • Published 3 years ago

bulletweb v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

What is BulletWeb?

Bullet Web - Developer Document

BulletWeb aims to deliver a unified, seamless development experience influenced by Ethereum's Web3 implementation. We have taken the core ideas and expanded upon it to unlock the functionality of BULLET's unique feature set along with offering new tools for integrating DApps in the browser, Node.js and IoT devices.

Compatibility

  • Version built for Node.js v6 and above
  • Version built for browsers with more than 0.25% market share

You can access either version specifically from the dist folder.

BulletWeb is also compatible with frontend frameworks such as:

  • Angular
  • React
  • Vue.

You can also ship BulletWeb in a Chrome extension.

Installation

Node.js

npm install bulletweb

or

yarn add bulletweb

Browser

First, don't use the release section of this repo, it has not updated in a long time.

Then easiest way to use BulletWeb in a browser is to install it as above and copy the dist file to your working folder. For example:

cp node_modules/bulletweb/dist/BulletWeb.js ./js/bulletweb.js

so that you can call it in your HTML page as

<script src="./js/bulletweb.js"><script>

Creating an Instance

First off, in your javascript file, define BulletWeb:

const BulletWeb = require('bulletweb')

The easiest way to instantiate bulletWeb is to run

const bulletWeb = new BulletWeb({
     fullNode: 'http://ip:port',
    solidityNode: 'http://ip:port'
    eventServer: 'http://ip:port',
    privateKey: '...'
})

but you can continue to use the old way:

const bulletWeb = new BulletWeb(fullNode, solidityNode, eventServer, privateKey)