Summary
Asset Hub is Polkadot's system parachain for issuing, managing, and transferring fungible and non-fungible assets. It provides low fees, flexible asset operations, and cross-chain interoperability via XCM. This article explains what Asset Hub is, why it matters, and how to connect to its RPC endpoints for development and production.
Quick recommendation: when to use Asset Hub RPC
If you are building a wallet, indexer, or DeFi application that needs to read or write asset balances, transfer tokens, or manage NFTs on Polkadot, Asset Hub is the chain you should target. Its RPC endpoints give you direct access to the asset pallets and XCM functionality. For production workloads, you will want a reliable RPC provider that offers both HTTPS and WebSocket endpoints, with the ability to scale as your user base grows. OnFinality provides dedicated nodes and RPC services for Asset Hub and other Polkadot system chains, so you can focus on your application logic instead of node operations.
What is Asset Hub?
Asset Hub is a system parachain on the Polkadot network. It is designed to be the primary place for creating, managing, and transferring both fungible and non-fungible assets. Unlike the relay chain, which only handles DOT and shared security, Asset Hub provides a specialized runtime that supports asset operations like minting, burning, transferring, and setting metadata. It also handles foreign assets from other chains via XCM, making it a central hub for cross-chain asset transfers.
Asset Hub was formerly known as Statemint. It is one of the "common good" parachains, meaning it provides infrastructure for the entire ecosystem. It has no inflation and its governance is controlled by the relay chain. Collators on Asset Hub receive a portion of transaction fees, but there are no era-based rewards.
Why Asset Hub matters for developers
For developers, Asset Hub offers several advantages over building directly on the relay chain:
- Lower fees: Transaction fees on Asset Hub are significantly lower than on the relay chain, making it cost-effective for high-volume asset operations.
- Lower existential deposit: The minimum balance required to keep an account alive is much lower (0.01 DOT compared to 1 DOT on the relay chain).
- Flexible asset support: You can issue your own tokens, NFTs, and even pay transaction fees with supported assets.
- Cross-chain interoperability: Assets can move between parachains via XCM, enabling complex multi-chain applications.
Asset Hub network details
Asset Hub runs on the Polkadot relay chain, so it shares the same security model. It has its own set of RPC endpoints that you can use to interact with the chain. The network is live on Polkadot mainnet, and there are also testnets like Paseo and Westend where you can experiment.
Here are the key network parameters you need to know:
| Parameter | Value |
|---|---|
| Chain name | Asset Hub Polkadot |
| Former name | Statemint |
| Relay chain | Polkadot |
| Native token | DOT |
| Existential deposit | 0.01 DOT |
| Common asset IDs | USDT: 1984, USDC: 1337 |
| Supported RPC transports | HTTPS, WSS |
How to connect to Asset Hub RPC
To interact with Asset Hub, you need an RPC endpoint. You can use a public endpoint for testing, but for production you should consider a dedicated or managed RPC service. OnFinality provides public and private endpoints for Asset Hub, which you can find on the Asset Hub network page.
Here is an example of how to make a JSON-RPC call to Asset Hub using curl:
curl -sS -X POST https://public-01.asset-hub-polkadot.rpc.onfinality.io \
-H 'Content-Type: application/json' \
-d '{"id":1,"jsonrpc":"2.0","method":"chain_getBlockHash","params":[0]}'
This call returns the hash of the first block on Asset Hub. You can replace the method with any other JSON-RPC method supported by Substrate-based chains.
Using Asset Hub with JavaScript libraries
If you are building a dApp, you will likely use a library like polkadot-js/api to interact with Asset Hub. Here is a simple example of how to connect and read an account balance:
const { ApiPromise, WsProvider } = require('@polkadot/api');
async function main() {
const provider = new WsProvider('wss://public-01.asset-hub-polkadot.rpc.onfinality.io');
const api = await ApiPromise.create({ provider });
const alice = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const balance = await api.query.system.account(alice);
console.log('Balance:', balance.data.free.toString());
await api.disconnect();
}
main().catch(console.error);
This script connects to Asset Hub via WebSocket, queries the account balance of Alice, and prints it. You can extend this to query assets, transfer tokens, or listen to events.
Asset Hub RPC methods and common use cases
Asset Hub supports the standard Substrate RPC methods, plus some specific to asset pallets. Here are the most common methods you will use:
assets_getAsset– Get details of a specific asset.assets_getAccount– Get the balance of an account for a specific asset.assets_getApprovedAccount– Get the approved account for a transfer.nft_getNft– Get details of an NFT.system_account– Get account information.chain_getBlock– Get block details.
For a full list, refer to the Polkadot API documentation.
Choosing the right RPC provider for Asset Hub
When selecting an RPC provider for Asset Hub, consider the following factors:
- Reliability: Your provider should have a high uptime and redundant infrastructure.
- Throughput: If you expect high traffic, you need a provider that can handle the load.
- WebSocket support: For real-time applications, WebSocket is essential.
- Archive data: If you need historical state, look for a provider that offers archive nodes.
- Pricing: Compare pricing models to find one that fits your budget.
OnFinality offers RPC services with flexible pricing and dedicated nodes for high-performance requirements. You can also check the RPC pricing page for details.
Common pitfalls and troubleshooting
When working with Asset Hub, you might encounter a few common issues:
- Incorrect endpoint: Make sure you are using the correct endpoint for the network you want (mainnet vs testnet).
- Rate limiting: Public endpoints may have rate limits. For production, use a dedicated or managed service.
- WebSocket disconnections: If you are using WebSocket, implement reconnection logic to handle drops.
- Asset ID confusion: Always verify the asset ID you are using, as different assets have different IDs.
If you experience issues, check the network status and your provider's documentation. OnFinality provides support for its services, so you can reach out if you need help.
Key Takeaways
- Asset Hub is Polkadot's system parachain for asset management, offering low fees and flexible asset operations.
- It supports both fungible and non-fungible assets, as well as cross-chain transfers via XCM.
- Developers can connect to Asset Hub via HTTPS or WebSocket RPC endpoints.
- For production, choose a reliable RPC provider like OnFinality to ensure uptime and performance.
- Always verify asset IDs and use the correct endpoints for your target network.
Frequently Asked Questions
What is the difference between Asset Hub and the Polkadot relay chain?
The relay chain provides shared security and consensus, while Asset Hub handles asset logic. Asset Hub is a parachain that runs on the relay chain, so it benefits from the same security but offers specialized asset functionality.
Can I use Asset Hub to issue my own token?
Yes, you can create your own fungible or non-fungible assets on Asset Hub. You will need to deposit a certain amount of DOT, but the fees are much lower than on the relay chain.
How do I transfer assets between Asset Hub and other parachains?
You can use XCM (Cross-Consensus Messaging) to transfer assets between Asset Hub and other parachains. This is done via the xcmPallet or through higher-level APIs.
Is Asset Hub available on testnets?
Yes, there are testnet versions of Asset Hub on Paseo and Westend. You can use these to test your applications before deploying to mainnet.
What RPC methods are available on Asset Hub?
Asset Hub supports standard Substrate RPC methods, plus asset-specific methods like assets_getAsset and nft_getNft. You can find the full list in the Polkadot API documentation.
How can I get a dedicated Asset Hub node?
OnFinality offers dedicated nodes for Asset Hub and other networks. You can contact us to set up a node tailored to your needs.