# @redstone-finance/rpc-providers

> :::info Tested only with JsonRpcProviders :::

Latest version **0.9.0** (published 2025-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @redstone-finance/rpc-providers
pnpm add @redstone-finance/rpc-providers
yarn add @redstone-finance/rpc-providers
bun add @redstone-finance/rpc-providers
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.0 |
| Published | 2025-08-11 |
| First published | 2023-09-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 482.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | redstone-finance |

## Links

- npm: https://www.npmjs.com/package/@redstone-finance/rpc-providers
- npm.io page: https://npm.io/package/@redstone-finance/rpc-providers

## Dependencies (12)

- [zod](https://npm.io/package/zod.md) ^3.22.4
- [axios](https://npm.io/package/axios.md) ^1.8.4
- [ethers](https://npm.io/package/ethers.md) ^5.7.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [@ethersproject/logger](https://npm.io/package/@ethersproject/logger.md) ^5.7.0
- [@redstone-finance/utils](https://npm.io/package/@redstone-finance/utils.md) 0.9.0
- [@redstone-finance/agents](https://npm.io/package/@redstone-finance/agents.md) 0.9.0
- [@ethersproject/properties](https://npm.io/package/@ethersproject/properties.md) ^5.7.0
- [@influxdata/influxdb-client](https://npm.io/package/@influxdata/influxdb-client.md) ^1.35.0
- [@redstone-finance/chain-configs](https://npm.io/package/@redstone-finance/chain-configs.md) 0.9.0
- [@redstone-finance/evm-multicall](https://npm.io/package/@redstone-finance/evm-multicall.md) 0.9.0
- [@ethersproject/abstract-provider](https://npm.io/package/@ethersproject/abstract-provider.md) ^5.7.0

## Recent versions

- 0.9.0 (latest) — 2025-08-11
- 0.8.0 — 2025-02-19
- 0.7.5 — 2025-02-05
- 0.7.4 — 2025-02-04
- 0.7.3 — 2024-12-11
- 0.7.2 — 2024-11-29
- 0.6.2 — 2024-09-16
- 0.6.1 — 2024-07-24
- 0.6.0 — 2024-07-18
- 0.5.4 — 2024-06-06
- 0.5.3 — 2024-06-06
- 0.5.2 — 2024-06-06
- 0.5.1 — 2024-05-16
- 0.5.0 — 2024-05-10
- 0.5.0-alpha.0 — 2024-05-10
- … 7 more at https://npm.io/package/@redstone-finance/rpc-providers/versions

## README

# Magic providers, compatible with ethers.Provider interface

:::info
Tested only with JsonRpcProviders
:::

## ProviderWithFallback

1. If the provider fails on some operation new provider is elected.
2. If all providers fail on the same operation error is thrown.
3. When we switch to the next provider, all operations are executed by it till it fails.
4. Providers are elected by the sequence given in array. If array ends we start from the beginning.

## ProviderWithAgreement

1. Works like `ProviderWithFallback, with an exception for two methods.
2. `getBlockNumber` asks all providers for blockNumber and then picks (default is median)
3. `call` asks all providers for result
   - if at least `N` answers are the same, it returns call result
   - ignores all errors
   - as soon as it will receive `N` matching responses returns. (doesn't wait for the rest of the providers to finish)

---
_Source: https://npm.io/package/@redstone-finance/rpc-providers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
