Chain Interactions¶
Introduction¶
This section shows how to interact with any Polkadot SDK-based chain using Parity's client libraries. Subxt is the main path throughout: a Rust library that generates type-safe interfaces from chain metadata. The Polkadot REST API provides a REST alternative for reading chain data.
The guides run against a local development node by default, so you can follow them without access to a live network. Point the same code at any other Polkadot SDK-based chain by changing the endpoint.
You'll learn how to:
- Query on-chain state and call runtime APIs.
- Send transactions, estimate their fees, and pay fees in non-native assets.
- Estimate the fees of cross-chain messages sent with XCM.
- Store and retrieve data on the Bulletin Chain.
- Create accounts programmatically.
Core Interaction Patterns¶
Query On-Chain Data¶
Accessing blockchain state is fundamental to building responsive applications. Polkadot SDK-based chains offer several ways to query on-chain data, each suited for different use cases.
| Title | Description |
|---|---|
| Read Chain State with SDKs | Programmatically read account information and other chain state with Subxt. |
| Read Chain State via REST API | Query chain data through standardized REST endpoints for simpler integration. |
| Call Runtime APIs | Execute runtime APIs directly for specialized queries and operations. |
Send Transactions¶
Transactions are the primary mechanism for modifying blockchain state. These guides cover transaction construction, signing, submission, and fees.
| Title | Description |
|---|---|
| Send a Transaction with SDKs | Build, sign, and submit transactions with Subxt. |
| Calculate Transaction Fees | Calculate transaction fees to ensure sufficient balance and optimize costs. |
| Pay Transaction Fees with Different Tokens | Pay transaction fees in non-native assets with the ChargeAssetTxPayment extension. |
Send Cross-Chain Transactions¶
Polkadot SDK-based chains communicate through Cross-Consensus Messaging (XCM), which lets chains exchange messages and transfer assets.
| Title | Description |
|---|---|
| Estimate XCM Transfer Fees | Estimate local, delivery, and remote execution fees for cross-chain messages. |
Store Data¶
The Bulletin Chain runtime provides content-addressed storage with IPFS-compatible CIDs.
| Title | Description |
|---|---|
| Store Data on the Bulletin Chain | Learn how to store an image on a Bulletin Chain node, obtain its CID, retrieve it over IPFS, and renew it before it expires. |
Manage Accounts¶
Accounts are the basis of user identity and transaction signing in blockchain applications.
| Title | Description |
|---|---|
| Create an Account | Generate an account and SS58 address in Rust. |
Manage Tokens¶
Guides for registering, converting, and transferring assets on live networks are available on developers.polkadot.com.
Parity Client Libraries¶
| Tool | Description |
|---|---|
| Subxt | Rust library for type-safe interaction with Polkadot SDK-based chains: storage queries, transactions, runtime APIs, and events. |
subxt-signer | Rust crate for deriving keys and signing transactions, including the development accounts used in local examples. |
| Polkadot REST API | REST service that exposes chain data from a Polkadot SDK-based node over HTTP. |
| Light clients | smoldot and Substrate Connect, for connecting to chains without trusting a full node. |
The same patterns work with third-party client libraries, for example Polkadot API (PAPI), Dedot, Polkadot.js API, and Python Substrate Interface.
| Created: November 17, 2026