# @polkadot-api/sm-provider

> `JsonRpcProvider` to connect to a chain via Smoldot.

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

## Install

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

## 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.3.8 |
| Published | 2026-07-20 |
| First published | 2024-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.7 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/sm-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/sm-provider

## Dependencies (2)

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

## Recent versions

- 0.3.8 (latest) — 2026-07-20
- 0.3.9-canary.49bdaa9 (canary) — 2026-09-01
- 0.3.0 (rc) — 2026-04-08
- 0.0.1-c9bb2ce3de90b7b5745189b6e3258c7cd945bb40.1.0 (next) — 2024-04-04
- 0.3.9-canary.786fa29 — 2026-09-01
- 0.3.9-canary.2bce46a — 2026-08-20
- 0.3.9-canary.e24aebd — 2026-08-20
- 0.3.9-canary.d8b2d3d — 2026-08-18
- 0.3.9-canary.8c00f44 — 2026-08-17
- 0.3.9-canary.57eb571 — 2026-07-29
- 0.3.9-canary.996069a — 2026-07-29
- 0.3.9-canary.7f105ae — 2026-07-28
- 0.3.9-canary.9390531 — 2026-07-20
- 0.3.8-canary.22b1f2b — 2026-07-20
- 0.3.8-canary.fdb7fff — 2026-07-13
- … 187 more at https://npm.io/package/@polkadot-api/sm-provider/versions

## README

# @polkadot-api/sm-provider

`JsonRpcProvider` to connect to a chain via Smoldot.

```ts
function getSmProvider(
  chain: smoldot.Chain | Promise<smoldot.Chain>,
): JsonRpcProvider
```

The parameter it takes is a `Chain` from smoldot, the return value of calling `smoldot.addChain(..)`

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