|
1 | 1 | --- |
| 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 |
2 | 5 | url: https://docs.polkadot.com/chain-interactions/ |
3 | 6 | --- |
4 | 7 |
|
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. |
0 commit comments