irc-json-rpc-infura
v0.1.1
Published
`json-rpc-engine` middleware for infura's REST endpoints.
Downloads
4
Readme
irc-json-rpc-infura
json-rpc-engine
middleware for infura's REST endpoints.
usage as provider
const createInfuraProvider = require('irc-json-rpc-infura/src/createProvider')
const Ircjs = require('ircjs')
const provider = createInfuraProvider({ network: 'mainnet' })
const irc = new Ircjs(provider)
usage as middleware
const createInfuraMiddleware = require('irc-json-rpc-infura')
const RpcEngine = require('json-rpc-engine')
const engine = new RpcEngine()
engine.push(createInfuraMiddleware({ network: 'ropsten' }))