product-sdk-chain-connection

Connect to Polkadot parachains and query chain state via @parity/product-sdk-chain-client.

8|3|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/paritytech/product-sdk --skill product-sdk-chain-connection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: product-sdk-chain-connection
Source: https://github.com/paritytech/product-sdk/tree/main/product-sdk/skills/product-sdk-chain-connection
Command: npx skills add https://github.com/paritytech/product-sdk --skill product-sdk-chain-connection

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @parity/product-sdk-chain-client, @parity/product-sdk-descriptors, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit addresses the challenge of connecting to Polkadot chains, querying their state, and interacting with their APIs, simplifying the process for developers.

Core Features & Use Cases

  • Chain Connection: Establish connections to Polkadot parachains using predefined or custom descriptors.
  • Querying Chain State: Retrieve information like account balances, block numbers, and transaction details.
  • Subscriptions: Monitor changes in chain state, such as balance updates.
  • Raw API Access: Provides access to the raw PAPI client for advanced operations.
  • Environment Support: Currently supports the "paseo" environment, with plans for "polkadot" and "kusama".

Quick Start

Use the getChainAPI function to connect to the "paseo" environment and query an account balance.

import { getChainAPI } from "@parity/product-sdk-chain-client";

const client = await getChainAPI("paseo");

const account = await client.assetHub.query.System.Account.getValue(
  "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
);
console.log("Free balance:", account.data.free);

client.destroy();

Frequently Asked Questions about product-sdk-chain-connection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Polkadot chain state using TypeScript?

To query Polkadot chain state using TypeScript, use the getChainAPI function to connect and retrieve values like account balances through the generated descriptors. You can access specific storage items directly via the typed client.

How do I subscribe to balance updates on a Polkadot parachain?

You can subscribe to balance updates on a Polkadot parachain by establishing a connection and using the subscription features provided by the chain client. This allows your application to monitor real-time changes in chain state.

Does the Polkadot API connection support the Kusama environment?

Currently, the Polkadot API connection explicitly supports the paseo environment. Support for the polkadot and kusama environments is planned for future updates but is not yet available.

Do I need custom descriptors to connect to a Polkadot parachain?

Yes, connecting to a Polkadot parachain requires appropriate descriptors to ensure the typed client can accurately decode the chain state. You can use predefined descriptors or provide custom ones for your specific parachain.

Can I access the raw PAPI client for advanced Polkadot operations?

Yes, you can access the raw PAPI client for advanced Polkadot operations. The Skill provides raw API access alongside the typed descriptors, allowing developers to perform complex interactions beyond standard state queries.