Package Exports
- eth-json-rpc-infura
- eth-json-rpc-infura/src/createProvider
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eth-json-rpc-infura) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eth-json-rpc-infura
json-rpc-engine
middleware for infura's REST endpoints.
usage as provider
const createInfuraProvider = require('eth-json-rpc-infura/src/createProvider')
const Ethjs = require('ethjs')
const provider = createInfuraProvider({ network: 'mainnet', projectId: 'example' })
const eth = new Ethjs(provider)
usage as middleware
const createInfuraMiddleware = require('eth-json-rpc-infura')
const RpcEngine = require('json-rpc-engine')
const engine = new RpcEngine()
engine.push(createInfuraMiddleware({ network: 'ropsten', projectId: 'example' }))