⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

Asset Hub - Polkadot's Native Asset Management Parachain

Chain RPC
With Dwellir, you get access to our global Chain network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.

Get your API key →

Why 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:

🔗 RPC Endpoints

Polkadot
Mainnet
Primary Asset Hub for production deployments.
WSS
wss://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY
✓ Archive Node✓ Trace API✓ Debug API✓ WebSocketOn-chain asset registry

Quick Connect:

curl -X POST https://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"chain_getBlock","params":[],"id":1}'
Multi-Network Support

Dwellir serves Asset Hub across every public Polkadot environment:

  • Asset Hub Polkadotwss://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY
  • Asset Hub Kusamawss://api-asset-hub-kusama.n.dwellir.com/YOUR_API_KEY
  • Asset Hub Westendhttps://api-asset-hub-westend.n.dwellir.com/YOUR_API_KEY
  • Asset Hub Paseohttps://api-asset-hub-paseo.n.dwellir.com/YOUR_API_KEY
  • Polkadot Sidecarhttps://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#

# Get chain information
curl -X POST https://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "system_chain",
"params": [],
"id": 1
}'

# Get latest finalized block
curl -X POST https://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "chain_getFinalizedHead",
"params": [],
"id": 1
}'

# Query account balance
curl -X POST https://api-asset-hub-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "state_getStorage",
"params": ["0x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9"],
"id": 1
}'

Network Information#

Genesis Hash

0x68d56f15...

Polkadot Asset Hub

Block Time

6 seconds

Instant finality

Native Token

DOT

Polkadot token

Parachain ID

1000

System parachain
Network 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#

🌐 Block Explorers#

💡 Example Projects#

Need Help?#


Build the future of cross-chain asset management on Asset Hub with Dwellir's reliable infrastructure. Get your API key →