@callistonetwork/eth-json-rpc-0xinfra

json-rpc-engine middleware for 0xinfra's REST endpoints.

Usage no npm install needed!

<script type="module">
  import callistonetworkEthJsonRpc0xinfra from 'https://cdn.skypack.dev/@callistonetwork/eth-json-rpc-0xinfra';
</script>

README

eth-json-rpc-0xinfra

json-rpc-engine middleware for 0xinfra's REST endpoints.

usage as provider

const create0xinfraProvider = require('eth-json-rpc-0xinfra/src/createProvider')
const Ethjs = require('ethjs')

const provider = create0xinfraProvider({ network: 'mainnet' })
const eth = new Ethjs(provider)

usage as middleware

const create0xinfraMiddleware = require('eth-json-rpc-0xinfra')
const RpcEngine = require('json-rpc-engine')

const engine = new RpcEngine()
engine.push(create0xinfraMiddleware({ network: 'ropsten' }))