# Function chainToChainId

- chainToChainId<K1>(args_0): (K1 extends bigint
  ? `bigint(${K1})`
  : K1 extends boolean
  ? `boolean(${K1})`
  : K1) extends "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"
  ? {
  Acala: 12;
  Algorand: 8;
  Aptos: 22;
  Arbitrum: 23;
  ArbitrumSepolia: 10003;
  Aurora: 9;
  Avalanche: 6;
  Base: 30;
  BaseSepolia: 10004;
  Bsc: 4;
  Btc: 29;
  Celo: 14;
  Cosmoshub: 4000;
  Ethereum: 2;
  Evmos: 4001;
  Fantom: 10;
  Gnosis: 25;
  Holesky: 10006;
  Injective: 19;
  Karura: 11;
  Klaytn: 13;
  Kujira: 4002;
  Moonbeam: 16;
  Near: 15;
  Neon: 17;
  Oasis: 7;
  Optimism: 24;
  OptimismSepolia: 10005;
  Osmosis: 20;
  Polygon: 5;
  Pythnet: 26;
  Rootstock: 33;
  Sei: 32;
  Sepolia: 10002;
  Solana: 1;
  Sui: 21;
  Terra: 3;
  Terra2: 18;
  Wormchain: 3104;
  Xpla: 28;
  }[Object] extends {
  [key: string]: unknown;
  }
  ? {
  Acala: 12;
  Algorand: 8;
  Aptos: 22;
  Arbitrum: 23;
  ArbitrumSepolia: 10003;
  Aurora: 9;
  Avalanche: 6;
  Base: 30;
  BaseSepolia: 10004;
  Bsc: 4;
  Btc: 29;
  Celo: 14;
  Cosmoshub: 4000;
  Ethereum: 2;
  Evmos: 4001;
  Fantom: 10;
  Gnosis: 25;
  Holesky: 10006;
  Injective: 19;
  Karura: 11;
  Klaytn: 13;
  Kujira: 4002;
  Moonbeam: 16;
  Near: 15;
  Neon: 17;
  Oasis: 7;
  Optimism: 24;
  OptimismSepolia: 10005;
  Osmosis: 20;
  Polygon: 5;
  Pythnet: 26;
  Rootstock: 33;
  Sei: 32;
  Sepolia: 10002;
  Solana: 1;
  Sui: 21;
  Terra: 3;
  Terra2: 18;
  Wormchain: 3104;
  Xpla: 28;
  }[Object]
  : {
  Acala: 12;
  Algorand: 8;
  Aptos: 22;
  Arbitrum: 23;
  ArbitrumSepolia: 10003;
  Aurora: 9;
  Avalanche: 6;
  Base: 30;
  BaseSepolia: 10004;
  Bsc: 4;
  Btc: 29;
  Celo: 14;
  Cosmoshub: 4000;
  Ethereum: 2;
  Evmos: 4001;
  Fantom: 10;
  Gnosis: 25;
  Holesky: 10006;
  Injective: 19;
  Karura: 11;
  Klaytn: 13;
  Kujira: 4002;
  Moonbeam: 16;
  Near: 15;
  Neon: 17;
  Oasis: 7;
  Optimism: 24;
  OptimismSepolia: 10005;
  Osmosis: 20;
  Polygon: 5;
  Pythnet: 26;
  Rootstock: 33;
  Sei: 32;
  Sepolia: 10002;
  Solana: 1;
  Sui: 21;
  Terra: 3;
  Terra2: 18;
  Wormchain: 3104;
  Xpla: 28;
  }[Object]
  : never

- #### Type Parameters

  - #### K1 extends "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Parameters

  - ##### args_0: K1

  #### Returns (K1 extends bigint
  ? `bigint(${K1})`
  : K1 extends boolean
  ? `boolean(${K1})`
  : K1) extends "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"
  ? {
  Acala: 12;
  Algorand: 8;
  Aptos: 22;
  Arbitrum: 23;
  ArbitrumSepolia: 10003;
  Aurora: 9;
  Avalanche: 6;
  Base: 30;
  BaseSepolia: 10004;
  Bsc: 4;
  Btc: 29;
  Celo: 14;
  Cosmoshub: 4000;
  Ethereum: 2;
  Evmos: 4001;
  Fantom: 10;
  Gnosis: 25;
  Holesky: 10006;
  Injective: 19;
  Karura: 11;
  Klaytn: 13;
  Kujira: 4002;
  Moonbeam: 16;
  Near: 15;
  Neon: 17;
  Oasis: 7;
  Optimism: 24;
  OptimismSepolia: 10005;
  Osmosis: 20;
  Polygon: 5;
  Pythnet: 26;
  Rootstock: 33;
  Sei: 32;
  Sepolia: 10002;
  Solana: 1;
  Sui: 21;
  Terra: 3;
  Terra2: 18;
  Wormchain: 3104;
  Xpla: 28;
  }[Object] extends {
  [key: string]: unknown;
  }
  ? {
  Acala: 12;
  Algorand: 8;
  Aptos: 22;
  Arbitrum: 23;
  ArbitrumSepolia: 10003;
  Aurora: 9;
  Avalanche: 6;
  Base: 30;
  BaseSepolia: 10004;
  Bsc: 4;
  Btc: 29;
  Celo: 14;
  Cosmoshub: 4000;
  Ethereum: 2;
  Evmos: 4001;
  Fantom: 10;
  Gnosis: 25;
  Holesky: 10006;
  Injective: 19;
  Karura: 11;
  Klaytn: 13;
  Kujira: 4002;
  Moonbeam: 16;
  Near: 15;
  Neon: 17;
  Oasis: 7;
  Optimism: 24;
  OptimismSepolia: 10005;
  Osmosis: 20;
  Polygon: 5;
  Pythnet: 26;
  Rootstock: 33;
  Sei: 32;
  Sepolia: 10002;
  Solana: 1;
  Sui: 21;
  Terra: 3;
  Terra2: 18;
  Wormchain: 3104;
  Xpla: 28;
  }[Object]
  : {
  Acala: 12;
  Algorand: 8;
  Aptos: 22;
  Arbitrum: 23;
  ArbitrumSepolia: 10003;
  Aurora: 9;
  Avalanche: 6;
  Base: 30;
  BaseSepolia: 10004;
  Bsc: 4;
  Btc: 29;
  Celo: 14;
  Cosmoshub: 4000;
  Ethereum: 2;
  Evmos: 4001;
  Fantom: 10;
  Gnosis: 25;
  Holesky: 10006;
  Injective: 19;
  Karura: 11;
  Klaytn: 13;
  Kujira: 4002;
  Moonbeam: 16;
  Near: 15;
  Neon: 17;
  Oasis: 7;
  Optimism: 24;
  OptimismSepolia: 10005;
  Osmosis: 20;
  Polygon: 5;
  Pythnet: 26;
  Rootstock: 33;
  Sei: 32;
  Sepolia: 10002;
  Solana: 1;
  Sui: 21;
  Terra: 3;
  Terra2: 18;
  Wormchain: 3104;
  Xpla: 28;
  }[Object]
  : never

  - Defined in core/base/dist/esm/constants/chains.d.ts:4

Generated using TypeDoc