Practical overview
When it fits
Use it when building a Polkadot or Substrate application that needs programmatic chain access through typed TypeScript APIs.
Who it is for
- TypeScript developers building Polkadot or Substrate applications.
- Teams that need typed access to chain data or application events.
- Developers integrating browser-extension or private-key signers into transaction workflows.
Documented uses
- Read typed chain storage and constants.
- Subscribe to finalized blocks and events.
- Access runtime calls and construct transaction workflows.
- Connect an application through smoldot or a WebSocket RPC provider.
Requirements & limits
The public repository is licensed under MIT.
- The README demonstrates both smoldot and WebSocket provider approaches; the selected endpoint and chain specification shape the connection.
- Types and documentation are generated from on-chain metadata.
- The libraries support browser-extension and private-key signers.
- The package offers separate subpaths and dynamic imports to avoid bundling unnecessary assets and favor faster loading.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Connect a client through smoldot
Set up the README’s light-client-backed JSON-RPC provider and create a Polkadot API client.
Before you start
- A TypeScript application environment with the Polkadot API and smoldot packages available.
- A worker-capable build setup for the README’s recommended smoldot Worker approach.
- The Polkadot chain specification used by the example.
Steps
Start smoldot with startFromWorker and a smoldot Worker.
Dynamically import the Polkadot chain specification and add it to smoldot.
Pass the resulting chain to getSmProvider to obtain a JSON-RPC provider.
Pass that provider to createClient.
Expected outcome
A client connected through a smoldot light-client-backed provider.
Guide limitations
- The README presents this setup for a Polkadot relay-chain specification; it does not establish compatibility with every chain.
- The example documents connection setup, not a tested deployment or a guarantee of endpoint or chain availability.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 11 October 2026
- Original website title
- polkadot-api/polkadot-api · Official homepage title · retained in its source language

