import { createChainClient } from "@polkadot-apps/chain-client";
import { paseo_asset_hub } from "@polkadot-apps/descriptors/paseo-asset-hub";
import { bulletin } from "@polkadot-apps/descriptors/bulletin";
const client = await createChainClient({
chains: { assetHub: paseo_asset_hub, bulletin },
rpcs: {
assetHub: ["wss://sys.ibp.network/asset-hub-paseo"],
bulletin: ["wss://paseo-bulletin-rpc.polkadot.io"],
},
});
// Fully typed from your descriptors
const account = await client.assetHub.query.System.Account.getValue(addr);
const fee = await client.bulletin.query.TransactionStorage.ByteFee.getValue();
// Raw client for advanced use (e.g., InkSdk for contracts)
import { createInkSdk } from "@polkadot-api/sdk-ink";
const inkSdk = createInkSdk(client.raw.assetHub, { atBest: true });
// Cleanup
client.destroy();
Create a multi-chain client with user-provided descriptors and RPC endpoints.
Returns fully-typed APIs for each chain plus raw
PolkadotClientaccess via.raw. Connections use host routing (via@polkadot-apps/host) when inside a container, falling back to direct WebSocket RPC.Results are cached by genesis-hash fingerprint — calling with the same descriptors returns the same instance.