@trufflesuite/eth-json-rpc-infura

4.0.3-0 • Public • Published

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' }))

/@trufflesuite/eth-json-rpc-infura/

    Package Sidebar

    Install

    npm i @trufflesuite/eth-json-rpc-infura

    Weekly Downloads

    3,980

    Version

    4.0.3-0

    License

    ISC

    Unpacked Size

    9.23 kB

    Total Files

    5

    Last publish

    Collaborators

    • rizedr
    • jeff.smale
    • kevinbluer
    • davidmurdoch
    • cds-amal