# @polkadot-api/logs-provider

> This package exports a `JsonRpcProvider` enhancer to record logs of messages sent & received, and a provider that reads from these logs to replay existing sessions.

Latest version **0.2.0** (published 2026-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @polkadot-api/logs-provider
pnpm add @polkadot-api/logs-provider
yarn add @polkadot-api/logs-provider
bun add @polkadot-api/logs-provider
```

## Health

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

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2026-04-08 |
| First published | 2024-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 155 |
| Author | Josep M Sobrepere |
| Maintainers | voliva, josepot |

## Links

- npm: https://www.npmjs.com/package/@polkadot-api/logs-provider
- 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/logs-provider

## Dependencies (1)

- [@polkadot-api/json-rpc-provider](https://npm.io/package/@polkadot-api/json-rpc-provider.md) 0.2.0

## Recent versions

- 0.2.0 (latest) — 2026-04-08
- 0.2.1-canary.786fa29 (canary) — 2026-09-01
- 0.0.1-c9bb2ce3de90b7b5745189b6e3258c7cd945bb40.1.0 (next) — 2024-04-04
- 0.2.1-canary.2bce46a — 2026-08-20
- 0.2.1-canary.e24aebd — 2026-08-20
- 0.2.1-canary.d8b2d3d — 2026-08-18
- 0.2.1-canary.8c00f44 — 2026-08-17
- 0.2.1-canary.57eb571 — 2026-07-29
- 0.2.1-canary.996069a — 2026-07-29
- 0.2.1-canary.7f105ae — 2026-07-28
- 0.2.1-canary.9390531 — 2026-07-20
- 0.2.1-canary.22b1f2b — 2026-07-20
- 0.2.1-canary.fdb7fff — 2026-07-13
- 0.2.1-canary.d2a06c4 — 2026-07-10
- 0.2.1-canary.cd20ed6 — 2026-07-09
- … 120 more at https://npm.io/package/@polkadot-api/logs-provider/versions

## README

# @polkadot-api/logs-provider

This package exports a `JsonRpcProvider` enhancer to record logs of messages sent & received, and a provider that reads from these logs to replay existing sessions.

This can be useful to set up reproduction cases with a provider that behaves consistently.

## withLogsRecorder

```ts
function withLogsRecorder(
  persistLog: (line: string) => void,
  provider: JsonRpcProvider,
): JsonRpcProvider
```

## logsProvider

```ts
function logsProvider(logs: string[]): JsonRpcProvider
```

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