Configuration for createChainClient.
Provide named chain descriptors and their RPC endpoints. TypeScript enforces that rpcs has the same keys as chains.
rpcs
chains
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"], },}); Copy
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"], },});
Record mapping user-chosen chain names to PAPI descriptors.
Named chain descriptors (PAPI ChainDefinition objects).
ChainDefinition
Optional
Optional per-chain connection metadata (lightclient specs, mode overrides).
RPC endpoints per chain name. Must have an entry for each key in chains.
Configuration for createChainClient.
Provide named chain descriptors and their RPC endpoints. TypeScript enforces that
rpcshas the same keys aschains.Example