Polkadot Apps
    Preparing search index...
    • Get a chain client for a known environment with built-in descriptors and RPCs.

      This is the zero-config path — no need to import descriptors or specify endpoints. For custom chains or BYOD descriptors, use createChainClient instead.

      Returns the same ChainClient type as createChainClient, with assetHub, bulletin, and individuality chain keys.

      Type Parameters

      Parameters

      • env: E

      Returns Promise<ChainClient<PresetChains<E>>>

      import { getChainAPI } from "@polkadot-apps/chain-client";

      const client = await getChainAPI("paseo");

      // Fully typed — no descriptor imports needed
      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 });

      client.destroy();