2.0.5 • Published 10 months ago

sastanaweb v2.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

What is SastanaWeb?

SastanaWeb aims to deliver a unified, seamless development experience influenced by Ethereum's Web3 implementation.

Compatibility

  • Version built for Node.js v6 and above

You can access either version specifically from the dist folder.

SastanaWeb is also compatible with frontend frameworks such as:

  • Angular
  • React
  • Vue.

Installation

Node.js

npm install sastanaweb

Browser

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

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

cp node_modules/sastanaweb/dist/SastanaWeb.js ./js/sastanaweb.js

so that you can call it in your HTML page as

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

Creating an Instance

First off, in your javascript file, define SastanaWeb:

const SastanaWeb = require('sastanaweb')

FullHost defines fullNode and solidityNode while the eventServer is specified, and the privateKey is passed separately.

const sastanaweb = new SastanaWeb({
    fullNode: 'http://<ip>:<portnumber>',
    solidityNode: 'http://<ip>:<portnumber>'
    eventServer: 'http://<ip>:<portnumber>',
    privateKey: '...'
  }
)

Contributions

In order to contribute you can

  • fork this repo and clone it locally
  • install the dependencies — npm i
  • do your changes to the code
  • build the SastanaWeb dist files — npm run build