Skip to content

Commit 77c2994

Browse files
Add chain interactions overview (#1182)
* add chain interactions overview * apply feedback, minor edits * update names to be action-oriented * add links to pages within each section * update psi link and remove target blank from unnecessary links * llms --------- Co-authored-by: Erin Shaben <[email protected]>
1 parent 92f1ad8 commit 77c2994

File tree

17 files changed

+272
-33
lines changed

17 files changed

+272
-33
lines changed

.ai/categories/basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7459,7 +7459,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
74597459

74607460
1. Scroll to the bottom and select **Development**.
74617461
2. Choose **Custom**.
7462-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
7462+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
74637463
4. Click the **Switch** button.
74647464

74657465
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

.ai/categories/dapps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10489,7 +10489,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
1048910489

1049010490
1. Scroll to the bottom and select **Development**.
1049110491
2. Choose **Custom**.
10492-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
10492+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
1049310493
4. Click the **Switch** button.
1049410494

1049510495
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

.ai/categories/infrastructure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10672,7 +10672,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
1067210672

1067310673
1. Scroll to the bottom and select **Development**.
1067410674
2. Choose **Custom**.
10675-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
10675+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
1067610676
4. Click the **Switch** button.
1067710677

1067810678
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

.ai/categories/networks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8699,7 +8699,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
86998699

87008700
1. Scroll to the bottom and select **Development**.
87018701
2. Choose **Custom**.
8702-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
8702+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
87038703
4. Click the **Switch** button.
87048704

87058705
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

.ai/categories/parachains.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16599,7 +16599,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
1659916599

1660016600
1. Scroll to the bottom and select **Development**.
1660116601
2. Choose **Custom**.
16602-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
16602+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
1660316603
4. Click the **Switch** button.
1660416604

1660516605
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

.ai/categories/polkadot-protocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9655,7 +9655,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
96559655

96569656
1. Scroll to the bottom and select **Development**.
96579657
2. Choose **Custom**.
9658-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
9658+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
96599659
4. Click the **Switch** button.
96609660

96619661
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

.ai/categories/smart-contracts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13818,7 +13818,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
1381813818

1381913819
1. Scroll to the bottom and select **Development**.
1382013820
2. Choose **Custom**.
13821-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
13821+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
1382213822
4. Click the **Switch** button.
1382313823

1382413824
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

.ai/categories/tooling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18984,7 +18984,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
1898418984

1898518985
1. Scroll to the bottom and select **Development**.
1898618986
2. Choose **Custom**.
18987-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
18987+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
1898818988
4. Click the **Switch** button.
1898918989

1899018990
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

.ai/pages/chain-interactions.md

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,95 @@
11
---
2+
title: Chain Interactions Overview
3+
description: Learn how to query data, send transactions, enable cross-chain communication, and manage accounts across the Polkadot ecosystem.
4+
categories: Chain Interactions
25
url: https://docs.polkadot.com/chain-interactions/
36
---
47

5-
TODO
8+
# Chain Interactions
9+
10+
## Introduction
11+
12+
Chain interactions form the foundation of building applications on Polkadot. Whether you're querying on-chain data, executing transactions, enabling cross-chain communication, or managing accounts, understanding how to interact with Polkadot-based chains is essential for application developers.
13+
14+
This section provides comprehensive guidance on the various ways to interact with Polkadot chains, from basic queries to complex cross-chain operations. You'll learn how to:
15+
16+
- Query on-chain state and subscribe to blockchain events.
17+
- Send transactions and manage their lifecycle.
18+
- Enable interoperability between parachains through XCM.
19+
- Manage tokens and perform token operations.
20+
- Create and manage accounts programmatically.
21+
22+
Whether you're building a frontend application, a backend service, or integrating with the Polkadot ecosystem, these guides will equip you with the knowledge and tools to effectively interact with chains across the network.
23+
24+
## Core Interaction Patterns
25+
26+
### Query On-Chain Data
27+
28+
Accessing blockchain state is fundamental to building responsive applications. Polkadot offers several methods to query on-chain data, each suited for different use cases.
29+
30+
- **[SDK integration](/chain-interactions/query-data/query-sdks/)**: Programmatically read blockchain state using:
31+
32+
- [Polkadot API (PAPI)](/reference/tools/papi/)
33+
- [Polkadot.js](/reference/tools/polkadot-js-api/)
34+
- [Dedot](/reference/tools/dedot/)
35+
- [Python Substrate Interface](/reference/tools/py-substrate-interface/)
36+
- [Subxt](/reference/tools/subxt/)
37+
38+
- **[REST API access](/chain-interactions/query-data/query-rest/)**: Query chain data through standardized REST endpoints for simpler integration.
39+
- **[Runtime API calls](/chain-interactions/query-data/runtime-api-calls/)**: Execute runtime APIs directly for specialized queries and operations.
40+
41+
### Send Transactions
42+
43+
Transactions are the primary mechanism for modifying blockchain state. Understanding transaction construction, signing, and submission is crucial for building interactive applications.
44+
45+
- **[Transaction construction](/chain-interactions/send-transactions/with-sdks/)**: Build transactions using various SDKs with proper encoding and formatting.
46+
- **[Fee estimation](/chain-interactions/send-transactions/calculate-transaction-fees/)**: Calculate transaction fees to ensure sufficient balance and optimize costs.
47+
- **[Multi-token fees](/chain-interactions/send-transactions/pay-fees-with-different-tokens/)**: Learn how to pay transaction fees with different tokens on supported chains.
48+
49+
### Send Cross-Chain Transactions
50+
51+
Polkadot enables native cross-chain capabilities through Cross-Consensus Messaging (XCM), allowing chains to securely communicate and transfer assets across the ecosystem.
52+
53+
- **[Transfer assets between parachains](/chain-interactions/send-transactions/interoperability/transfer-assets-parachains/)**: Understand how to construct and send XCM messages using [ParaSpell XCM SDK](/reference/tools/paraspell/){target=\_blank} and [Polkadot API (PAPI)](/reference/tools/papi/){target=\_blank}.
54+
- **[Transfer assets out of Polkadot](/chain-interactions/send-transactions/interoperability/transfer-assets-out-of-polkadot/)**: Connect to blockchains outside the Polkadot ecosystem using [Snowbridge](https://wiki.polkadot.com/learn/learn-snowbridge/){target=\_blank} and other bridge solutions.
55+
56+
### Manage Tokens
57+
58+
Polkadot Hub provides a unified platform for managing assets across the ecosystem. Understanding token operations is essential for DeFi applications and multi-chain asset management.
59+
60+
- **[Local asset registration](/chain-interactions/token-operations/register-local-asset/)**: Learn how assets created in Asset Hub are registered on the network.
61+
- **[Foregin asset registration](/chain-interactions/token-operations/register-foreign-asset/)**: Learn how assets created outside of Asset Hub are registered on the network.
62+
- **[Convert assets](/chain-interactions/token-operations/convert-assets/)**: Convert, swap, and manage assets on-chain using the Asset Conversion pallet.
63+
- **Asset Hub integration**: Interact with Polkadot's central asset management hub using [Polkadot.js Apps](https://polkadot.js.org/apps/){target=\_blank}.
64+
65+
### Manage Accounts
66+
67+
Account management forms the basis of user identity and authentication in blockchain applications. Learn how to create, manage, and query accounts programmatically.
68+
69+
- **[Account creation](/chain-interactions/accounts/create-account/)**: Generate accounts using various SDKs in Rust, Python, and JavaScript.
70+
- **[Account queries](/chain-interactions/accounts/query-accounts/)**: Retrieve account information including balances, nonces, and metadata.
71+
72+
## Development Tools and SDKs
73+
74+
The Polkadot ecosystem offers a rich set of tools and libraries to facilitate chain interactions:
75+
76+
- **[Polkadot API (PAPI)](/reference/tools/papi/)**: Modern, type-safe TypeScript library with full metadata support.
77+
- **[Polkadot.js](/reference/tools/polkadot-js-api/)**: Comprehensive JavaScript library with extensive ecosystem support.
78+
- **[Dedot](/reference/tools/dedot/)**: Lightweight TypeScript library optimized for performance.
79+
- **[Python Substrate Interface](/reference/tools/py-substrate-interface/)**: Polkadot Substrate Interface for streamlined development.
80+
- **[Subxt](/reference/tools/subxt/)**: Rust library for building robust substrate-based applications.
81+
- **[Polkadot.js Apps](https://polkadot.js.org/apps/)**: Web-based interface for exploring and interacting with chains.
82+
83+
Each tool has its strengths, and choosing the right one depends on your project requirements, programming language preference, and specific use cases.
84+
85+
## Next Steps
86+
87+
Explore the sections below to dive deeper into specific chain interaction patterns:
88+
89+
- **[Query On-Chain Data](/chain-interactions/query-data/query-sdks/)**: Learn to read blockchain state efficiently.
90+
- **[Send Transactions](/chain-interactions/send-transactions/with-sdks/)**: Master transaction construction and submission.
91+
- **[Send Cross-Chain Transactions](/chain-interactions/send-transactions/interoperability/transfer-assets-parachains/)**: Enable cross-chain communication with XCM.
92+
- **[Manage Tokens](/chain-interactions/token-operations/register-local-asset/)**: Manage assets across the Polkadot ecosystem.
93+
- **[Manage Accounts](/chain-interactions/accounts/create-account/)**: Create and query accounts programmatically.
94+
95+
Each section provides practical examples, code snippets, and comprehensive guides to help you build production-ready applications on Polkadot.

.ai/pages/parachains-launch-a-parachain-set-up-the-parachain-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ When running the template node, it's accessible by default at `ws://localhost:99
189189

190190
1. Scroll to the bottom and select **Development**.
191191
2. Choose **Custom**.
192-
3. Enter `ws: //localhost:9944` in the **custom endpoint** input field.
192+
3. Enter `ws://localhost:9944` in the **custom endpoint** input field.
193193
4. Click the **Switch** button.
194194

195195
![](/images/parachains/launch-a-parachain/set-up-the-parachain-template/parachain-template-02.webp)

0 commit comments

Comments
 (0)