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();