sgcweb3
v1.0.0-sgc-beta-26
Published
SGC JavaScript API wrapper repository
Downloads
1
Maintainers
Readme
PREVIEW RELEASE This is a copy of original web3, changed as per SGC requirements!
SGCweb3.js - SGC JavaScript API
You need to run a local or remote SGC node to use this library.
Installation
Node
npm install sgcweb3@latest
Usage
// in node.js
var SGCWeb3 = require('sgcweb3');
var SGCweb3 = new SGCWeb3('ws://localhost:8546');
console.log(SGCweb3);
Additionally you can set a provider using SGCweb3.providers.HttpProvider()
const SGCWeb3 = require('sgcweb3');
const SGCweb3 = new SGCWeb3(new SGCWeb3.providers.HttpProvider('http://13.229.152.61:8501'));
There you go, now you can use it:
SGCweb3.eth.getAccounts()
.then(console.log);
Building
Requirements
- Node.js
- npm
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo npm install lerna bootstrap