@ostdotcom/xweb3

Ethereum interaction layer by extending web3.js

Usage no npm install needed!

<script type="module">
  import ostdotcomXweb3 from 'https://cdn.skypack.dev/@ostdotcom/xweb3';
</script>

README

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 );