OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Polkadot API

Polkadot API is a TypeScript library suite for building applications that interact with Polkadot and Substrate chains. It connects through JSON-RPC providers, including smoldot light clients and WebSocket endpoints, and provides typed APIs for storage, constants, transactions, events, runtime calls and finalized blocks.

Independent OpenViST project profile, based on linked sources.

Polkadot API — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Start smoldot with startFromWorker and a smoldot Worker.

  2. Dynamically import the Polkadot chain specification and add it to smoldot.

  3. Pass the resulting chain to getSmProvider to obtain a JSON-RPC provider.

  4. 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.
Evidence and transparency

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