Asset Hub - Polkadot Asset Management
Complete guide to Asset Hub Polkadot integration with Dwellir RPC. Access native asset management, NFT functionality, and efficient cross-chain transfers on Polkadot's system parachain.
Asset Hub RPC
With Dwellir, you get access to our global Asset Hub network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Get your API keyWhy Build on Asset Hub?
Asset Hub is Polkadot's native system parachain designed for efficient asset creation, management, and transfers. As a core infrastructure parachain, Asset Hub provides low-cost asset operations and seamless integration with the broader Polkadot ecosystem.
Native Asset Management
- Asset creation - Mint fungible and non-fungible tokens natively
- Low transaction costs - Optimized for high-frequency asset operations
- Cross-chain transfers - Seamless XCM integration with all parachains
- DOT integration - Native support for Polkadot's main token
Multi-Network Support
- Polkadot Asset Hub - Main network for production applications
- Kusama Asset Hub - Canary network for testing and experimentation
- Westend Asset Hub - Test network for development and staging
- Paseo Asset Hub - Community-operated testnet tracking Polkadot releases
- Polkadot Sidecar - Managed Sidecar API surface for REST-friendly data access
Performance & Efficiency
- Fast finality - ~6 second block times with instant finality
- Minimal fees - Optimized for micro-transactions and asset operations
- Substrate runtime - Built on battle-tested Polkadot technology
- XCM native - First-class cross-chain messaging support
Quick Start with Asset Hub
Connect to Asset Hub networks with Dwellir's reliable endpoints:
curl -sS -X POST https://api-asset-hub-polkadot.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots> \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"chain_getBlockHash","params":[0],"id":1}'import { ApiPromise, WsProvider } from '@polkadot/api';const provider = new WsProvider('wss://api-asset-hub-polkadot.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>');const api = await ApiPromise.create({ provider });const hash = await api.rpc.chain.getBlockHash(0);console.log(hash.toHex());from substrateinterface import SubstrateInterfacesubstrate = SubstrateInterface(url='wss://api-asset-hub-polkadot.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>')block_hash = substrate.get_block_hash(block_id=0)print(block_hash)package mainimport ( "bytes" "fmt" "io" "net/http")func main() { url := "https://api-asset-hub-polkadot.n.dwellir.com/<API_Keys_Are_Not_Made_for_Bots>" payload := []byte(`{"jsonrpc":"2.0","id":1,"method":"chain_getBlockHash","params":[0]}`) resp, err := http.Post(url, "application/json", bytes.NewBuffer(payload)) if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) fmt.Println(string(body))}Multi-Network Support
Dwellir serves Asset Hub across every public Polkadot environment:
- Asset Hub Polkadot –
wss://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY - Asset Hub Kusama –
wss://api-asset-hub-kusama.n.dwellir.com/YOUR_API_KEY - Asset Hub Westend –
https://api-asset-hub-westend.n.dwellir.com/YOUR_API_KEY - Asset Hub Paseo –
https://api-asset-hub-paseo.n.dwellir.com/YOUR_API_KEY - Polkadot Sidecar –
https://api-asset-hub-polkadot-sidecar.n.dwellir.com/YOUR_API_KEY
The Sidecar tab exposes a managed Polkadot Sidecar deployment so you can issue REST requests (for example /accounts or /blocks) without running additional infrastructure.
Installation & Setup
Network Information
| Parameter | Value | Details |
|---|---|---|
| Genesis Hash | 0x68d56f15... | Polkadot Asset Hub |
| Block Time | 6 seconds | Instant finality |
| Native Token | DOT | Polkadot token |
| Parachain ID | 1000 | System parachain |
Network Details
| Parameter | Value | Details |
|---|---|---|
| Polkadot Asset Hub Parachain ID | 1000 | |
| Kusama Asset Hub Parachain ID | 1000 | |
| Westend Asset Hub Parachain ID | 1000 | |
| Native Token | DOT (Polkadot), KSM (Kusama), WND (Westend) | |
| Consensus | Nominated Proof of Stake (via Relay Chain) | |
| Finality | Instant (via GRANDPA finality gadget) |
Core Features
Asset Management
Create and manage fungible assets with native support:
// Create a new asset
const createAsset = async (api, signer, assetId, admin, minBalance) => {
const tx = api.tx.assets.create(assetId, admin, minBalance);
const hash = await tx.signAndSend(signer);
return hash;
};
// Set asset metadata
const setMetadata = async (api, signer, assetId, name, symbol, decimals) => {
const tx = api.tx.assets.setMetadata(assetId, name, symbol, decimals);
const hash = await tx.signAndSend(signer);
return hash;
};
// Mint assets
const mintAsset = async (api, signer, assetId, beneficiary, amount) => {
const tx = api.tx.assets.mint(assetId, beneficiary, amount);
const hash = await tx.signAndSend(signer);
return hash;
};NFT Support
Work with non-fungible tokens using the Uniques pallet:
// Create an NFT collection
const createCollection = async (api, signer, collectionId, admin) => {
const tx = api.tx.uniques.create(collectionId, admin);
const hash = await tx.signAndSend(signer);
return hash;
};
// Mint an NFT
const mintNFT = async (api, signer, collectionId, itemId, owner) => {
const tx = api.tx.uniques.mint(collectionId, itemId, owner);
const hash = await tx.signAndSend(signer);
return hash;
};
// Set NFT metadata
const setNFTMetadata = async (api, signer, collectionId, itemId, data) => {
const tx = api.tx.uniques.setMetadata(collectionId, itemId, data, false);
const hash = await tx.signAndSend(signer);
return hash;
};Cross-Chain Transfers (XCM)
Send assets across the Polkadot ecosystem:
// Transfer DOT to another parachain
const xcmTransfer = async (api, signer, dest, beneficiary, amount) => {
const destination = {
V3: {
parents: 1,
interior: {
X1: {
Parachain: dest // Destination parachain ID
}
}
}
};
const account = {
V3: {
parents: 0,
interior: {
X1: {
AccountId32: {
network: null,
id: beneficiary
}
}
}
}
};
const assets = {
V3: [
{
id: {
Concrete: {
parents: 1,
interior: 'Here'
}
},
fun: {
Fungible: amount
}
}
]
};
const tx = api.tx.polkadotXcm.limitedReserveTransferAssets(
destination,
account,
assets,
0,
'Unlimited'
);
const hash = await tx.signAndSend(signer);
return hash;
};Common Integration Patterns
Multi-Asset Wallet
Build wallets supporting multiple Asset Hub tokens:
class AssetHubWallet {
constructor(api, address) {
this.api = api;
this.address = address;
}
async getAllBalances() {
const balances = {};
// Get DOT balance
const account = await this.api.query.system.account(this.address);
balances.DOT = {
free: account.data.free.toString(),
reserved: account.data.reserved.toString(),
symbol: 'DOT',
decimals: 10
};
// Get asset balances
const assets = await this.api.query.assets.account.entries(this.address);
for (const [key, balance] of assets) {
const assetId = key.args[0].toString();
const metadata = await this.api.query.assets.metadata(assetId);
balances[metadata.symbol.toString()] = {
free: balance.unwrap().balance.toString(),
assetId,
symbol: metadata.symbol.toString(),
decimals: metadata.decimals.toNumber()
};
}
return balances;
}
async transferAsset(assetId, recipient, amount) {
let tx;
if (assetId === 'DOT') {
// Native DOT transfer
tx = this.api.tx.balances.transferKeepAlive(recipient, amount);
} else {
// Asset transfer
tx = this.api.tx.assets.transferKeepAlive(assetId, recipient, amount);
}
return tx;
}
}Asset Analytics
Track asset metrics and usage:
class AssetAnalytics {
constructor(api) {
this.api = api;
}
async getAssetInfo(assetId) {
const [details, metadata] = await Promise.all([
this.api.query.assets.asset(assetId),
this.api.query.assets.metadata(assetId)
]);
if (details.isNone) {
throw new Error(`Asset ${assetId} not found`);
}
const assetDetails = details.unwrap();
return {
id: assetId,
name: metadata.name.toString(),
symbol: metadata.symbol.toString(),
decimals: metadata.decimals.toNumber(),
supply: assetDetails.supply.toString(),
accounts: assetDetails.accounts.toNumber(),
sufficients: assetDetails.sufficients.toNumber(),
owner: assetDetails.owner.toString(),
issuer: assetDetails.issuer.toString(),
admin: assetDetails.admin.toString(),
freezer: assetDetails.freezer.toString(),
minBalance: assetDetails.minBalance.toString(),
isSufficient: assetDetails.isSufficient.toBoolean()
};
}
async getTopAssets(limit = 10) {
const assets = [];
// Get all assets
const assetEntries = await this.api.query.assets.asset.entries();
for (const [key, details] of assetEntries) {
const assetId = key.args[0].toString();
const metadata = await this.api.query.assets.metadata(assetId);
assets.push({
id: assetId,
symbol: metadata.symbol.toString(),
supply: details.unwrap().supply.toString(),
accounts: details.unwrap().accounts.toNumber()
});
}
// Sort by number of accounts (popularity)
return assets
.sort((a, b) => b.accounts - a.accounts)
.slice(0, limit);
}
}NFT Marketplace Integration
Integrate with NFT collections:
class NFTCollection {
constructor(api, collectionId) {
this.api = api;
this.collectionId = collectionId;
}
async getCollectionInfo() {
const [details, metadata] = await Promise.all([
this.api.query.uniques.class(this.collectionId),
this.api.query.uniques.classMetadataOf(this.collectionId)
]);
return {
id: this.collectionId,
owner: details.unwrap().owner.toString(),
issuer: details.unwrap().issuer.toString(),
admin: details.unwrap().admin.toString(),
freezer: details.unwrap().freezer.toString(),
totalDeposit: details.unwrap().totalDeposit.toString(),
freeHolding: details.unwrap().freeHolding.toBoolean(),
instances: details.unwrap().instances.toNumber(),
instanceMetadatas: details.unwrap().instanceMetadatas.toNumber(),
attributes: details.unwrap().attributes.toNumber(),
isFrozen: details.unwrap().isFrozen.toBoolean(),
metadata: metadata.isSome ? metadata.unwrap().data.toString() : null
};
}
async getAllItems() {
const items = [];
const itemEntries = await this.api.query.uniques.asset.entries();
for (const [key, details] of itemEntries) {
const [collectionId, itemId] = key.args;
if (collectionId.toString() === this.collectionId.toString()) {
const metadata = await this.api.query.uniques.instanceMetadataOf(
collectionId,
itemId
);
items.push({
collectionId: collectionId.toString(),
itemId: itemId.toString(),
owner: details.unwrap().owner.toString(),
approved: details.unwrap().approved.isSome
? details.unwrap().approved.unwrap().toString()
: null,
isFrozen: details.unwrap().isFrozen.toBoolean(),
deposit: details.unwrap().deposit.toString(),
metadata: metadata.isSome ? metadata.unwrap().data.toString() : null
});
}
}
return items;
}
}Performance Optimization
1. Efficient State Queries
Batch multiple queries for better performance:
async function batchQueries(api, queries) {
const results = await Promise.all(queries.map(query => {
if (query.type === 'storage') {
return api.query[query.module][query.method](...query.args);
} else if (query.type === 'rpc') {
return api.rpc[query.module][query.method](...query.args);
}
}));
return results;
}
// Example usage
const queries = [
{ type: 'storage', module: 'system', method: 'account', args: [address] },
{ type: 'storage', module: 'assets', method: 'asset', args: [1000] },
{ type: 'rpc', module: 'chain', method: 'getFinalizedHead', args: [] }
];
const [account, asset, head] = await batchQueries(api, queries);2. Event Subscription
Monitor blockchain events efficiently:
async function subscribeToAssetEvents(api, callback) {
const unsubscribe = await api.query.system.events((events) => {
events.forEach((record) => {
const { event } = record;
if (api.events.assets.Transferred.is(event)) {
const [assetId, from, to, amount] = event.data;
callback({
type: 'AssetTransferred',
assetId: assetId.toString(),
from: from.toString(),
to: to.toString(),
amount: amount.toString()
});
} else if (api.events.assets.Created.is(event)) {
const [assetId, creator, owner] = event.data;
callback({
type: 'AssetCreated',
assetId: assetId.toString(),
creator: creator.toString(),
owner: owner.toString()
});
}
});
});
return unsubscribe;
}Developer Resources
Official Resources
Developer Tools
- Polkadot.js Apps - Web interface for Asset Hub
- Polkadot.js API - JavaScript SDK
- Subxt - Rust SDK for Substrate chains
- py-substrate-interface - Python SDK
Block Explorers
Example Projects
Need Help?
- Email: support@dwellir.com
- Polkadot Wiki: wiki.polkadot.network
- Dashboard: dashboard.dwellir.com
- Community: Polkadot Discord
Build the future of cross-chain asset management on Asset Hub with Dwellir's reliable infrastructure. Get your API key
eth_estimateL1Fee - Estimate L1 data postin...
Estimate L1 data posting fee on Arbitrum. Essential for blockchain interaction.
chain_getBlock
Retrieve block data by hash on Asset Hub. Essential for accessing block headers and extrinsics on Polkadot's system parachain managing $4.5B+ in DOT tokens, native USDC/USDT, and NFTs.

