# eth-json-rpc-infura

> json-rpc-engine middleware for Infura's endpoints

Latest version **5.1.0** (published 2020-09-23) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install eth-json-rpc-infura
pnpm add eth-json-rpc-infura
yarn add eth-json-rpc-infura
bun add eth-json-rpc-infura
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 5.1.0 |
| Published | 2020-09-23 |
| First published | 2017-12-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 54 |
| Maintainers | estebanmino, rekmarks, whymarrh, danfinlay, kumavis |

## Links

- npm: https://www.npmjs.com/package/eth-json-rpc-infura
- Repository: https://github.com/MetaMask/eth-json-rpc-infura
- Homepage: https://github.com/MetaMask/eth-json-rpc-infura#readme
- Issues: https://github.com/MetaMask/eth-json-rpc-infura/issues
- npm.io page: https://npm.io/package/eth-json-rpc-infura

## Dependencies (4)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [eth-rpc-errors](https://npm.io/package/eth-rpc-errors.md) ^3.0.0
- [json-rpc-engine](https://npm.io/package/json-rpc-engine.md) ^5.3.0
- [eth-json-rpc-middleware](https://npm.io/package/eth-json-rpc-middleware.md) ^6.0.0

## Recent versions

- 5.1.0 (latest) — 2020-09-23
- 5.0.0 — 2020-09-08
- 4.1.0 — 2020-09-03
- 4.0.2 — 2019-08-31
- 3.2.1 — 2019-08-31
- 4.0.1 — 2019-08-20
- 4.0.0 — 2019-03-11
- 3.2.0 — 2019-01-24
- 3.1.2 — 2018-05-07
- 3.1.1 — 2018-04-27
- 3.1.0 — 2018-04-10
- 3.0.0 — 2018-01-25
- 2.0.11 — 2018-01-19
- 2.0.10 — 2018-01-19
- 2.0.9 — 2018-01-19
- … 12 more at https://npm.io/package/eth-json-rpc-infura/versions

## README

# eth-json-rpc-infura

`json-rpc-engine` middleware for infura's REST endpoints.

### usage as provider

```js
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

```js
const createInfuraMiddleware = require('eth-json-rpc-infura')
const RpcEngine = require('json-rpc-engine')

const engine = new RpcEngine()
engine.push(createInfuraMiddleware({ network: 'ropsten', projectId: 'example' }))
```

---
_Source: https://npm.io/package/eth-json-rpc-infura · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
