Skip to content

ostdotcom/xweb3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xweb3

Ethereum interaction layer by extending web3.js Build Status npm version

Install

npm install @ostdotcom/xweb3 --save

OSTWeb3 Usage

const xweb3 = require('@ostdotcom/xweb3'), 
    wsEndPoint = "ws://127.0.0.1:8546",
    rpcEndPoint = "http://127.0.0.1:8545";

// The below instance of web3 uses OstWSProvider.
// OstWSProvider automatically tries to reconnect when connection is broken.
let wsWeb3 = new xweb3.OstWeb3( wsEndPoint );

// The below instance is same as new Web3( rpcEndPoint );
let rpcWeb3 = new xweb3.OstWeb3( rpcEndPoint );