# @polkadot-api/json-rpc-provider-proxy

> This package exports `getSyncProvider`, a function to create `JsonRpcProvider`s that will act as if the connection happen synchronously.

Latest version **0.4.1** (published 2026-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @polkadot-api/json-rpc-provider-proxy
pnpm add @polkadot-api/json-rpc-provider-proxy
yarn add @polkadot-api/json-rpc-provider-proxy
bun add @polkadot-api/json-rpc-provider-proxy
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2026-07-20 |
| First published | 2023-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 29.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 156 |
| Author | Josep M Sobrepere |
| Maintainers | voliva, josepot |

## Links

- npm: https://www.npmjs.com/package/@polkadot-api/json-rpc-provider-proxy
- Repository: https://github.com/polkadot-api/polkadot-api
- Homepage: https://github.com/polkadot-api/polkadot-api#readme
- Issues: https://github.com/polkadot-api/polkadot-api/issues
- npm.io page: https://npm.io/package/@polkadot-api/json-rpc-provider-proxy

## Recent versions

- 0.4.1 (latest) — 2026-07-20
- 0.4.2-canary.49bdaa9 (canary) — 2026-09-01
- 0.4.0 (rc) — 2026-04-08
- 0.0.1-c9bb2ce3de90b7b5745189b6e3258c7cd945bb40.1.0 (next) — 2024-04-04
- 0.0.1-5f21a32c61a607b71f74693e0a46e8f69d497381.1.0 (pr-246) — 2024-01-23
- 0.0.1-097dae903cc84c0d8a6c93f39fef5e4724660825.1.0 (pr-245) — 2024-01-16
- 0.0.1-f90412d81eb4e75dd03050a8ce7ee4aee1881690.1.0 (pr-244) — 2024-01-16
- 0.0.1-5385372d2b5500605bc9e86b6dbd27cfd9c6469c.1.0 (pr-243) — 2024-01-16
- 0.0.1-e1be57e0d4bc452f101c3e64c37017f231803058.1.0 (pr-238) — 2024-01-16
- 0.0.1-1a9587dd9ccd1bd2572739a3ff81de3474fc0149.1.0 (pr-242) — 2024-01-16
- 0.0.1-a8c4f3c213c8f8c3b2e1c24500e4ea5c7f2142c7.1.0 (pr-241) — 2024-01-16
- 0.0.1-e894d16c994c9488b76ceaa4516cabcfaf1d94a0.1.0 (pr-240) — 2024-01-12
- 0.0.1-2d0e2e33524cf1d48d0feec107b24d2133c3c030.1.0 (pr-239) — 2024-01-08
- 0.0.1-248f1539f4e2c04e472a0c5dc0b982429f85c905.1.0 (pr-237) — 2024-01-07
- 0.0.1-0dc74a3df9195fb0e26e1ab223c34285d11bc4fe.1.0 (pr-236) — 2024-01-07
- … 536 more at https://npm.io/package/@polkadot-api/json-rpc-provider-proxy/versions

## README

# @polkadot-api/json-rpc-provider-proxy

This package exports `getSyncProvider`, a function to create `JsonRpcProvider`s that will act as if the connection happen synchronously.

```ts
export type AsyncJsonRpcProvider = (
  onMessage: (message: string) => void,
  onHalt: () => void,
) => JsonRpcConnection

function getSyncProvider(
  input: () => Promise<AsyncJsonRpcProvider>,
): JsonRpcProvider
```

The returned provider will buffer up every message until it can get the `JsonRpcConnection`, at which point it will send every message buffered.

---
_Source: https://npm.io/package/@polkadot-api/json-rpc-provider-proxy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
