susyweb-providers-http
v1.0.0-beta.37
Published
Module to handle susyweb RPC connections over HTTP.
Downloads
7
Readme
susyweb-providers-http
This is a sub package of susyweb.js
This is a HTTP provider for susyweb.js.
Please read the documentation for more.
Installation
Node.js
npm install susyweb-providers-http
In the Browser
Build running the following in the susyweb.js repository:
npm run-script build-all
Then include dist/susyweb-providers-http.js
in your html file.
This will expose the SusyWebHttpProvider
object on the window object.
Usage
// in node.js
var SusyWebHttpProvider = require('susyweb-providers-http');
var options = {
timeout: 20000, // milliseconds,
headers: [{name: 'Access-Control-Allow-Origin', value: '*'},{...}]
};
var http = new SusyWebHttpProvider('http://localhost:8545', options);