1.0.0 • Published 3 years ago

stabilaweb v1.0.0

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

What is StabilaWeb?

Stabila Web - Developer Document

StabilaWeb 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 STABILA'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.

StabilaWeb is also compatible with frontend frameworks such as:

  • Angular
  • React
  • Vue.

You can also ship StabilaWeb in a Chrome extension.

Installation

Node.js

npm install stabilaweb

or

yarn add stabilaweb

Browser

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

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

cp node_modules/stabilaweb/dist/StabilaWeb.js ./js/stabilaweb.js

so that you can call it in your HTML page as

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

Creating an Instance

First off, in your javascript file, define StabilaWeb:

const StabilaWeb = require('stabilaweb')

The easiest way to instantiate stabilaWeb is to run

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

but you can continue to use the old way:

const stabilaWeb = new StabilaWeb(fullNode, solidityNode, eventServer, privateKey)