The Wayback Machine - https://web.archive.org/web/20200513144050/https://github.com/brave/eth-json-rpc-infura
Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download
This branch is 19 commits ahead, 1 commit behind MetaMask:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.gitignore
README.md
package-lock.json
package.json

README.md

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' })
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' }))
You can’t perform that action at this time.