> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# chains: Canonical chains

> Canonical chains: the declaration and description of each of the 19 exports of @eco-incorp/sauce, @eco-incorp/sauce/chains.

Two registries. `CANONICAL_CHAINS` holds every chain a program can name, EVM chains and Solana, and is read by `requireChain`, `resolveChain` and the slug, id and alias lookups. The `chains` record, read by `getChain`, holds native-currency and explorer metadata for most EVM chains. The same exports come from the root and from `@eco-incorp/sauce/chains`.

```typescript theme={null}
import { requireChain, getChain } from "@eco-incorp/sauce/chains";
```

Generated from the type declarations of `@eco-incorp/sauce`.

### `normalizeChainKey`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

The ONE normalizer: lowercased, trimmed, punctuation/whitespace stripped.

```typescript theme={null}
export declare function normalizeChainKey(input: string): string;
```

### `chainById`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

O(1) lookup by numeric chain id.

```typescript theme={null}
export declare function chainById(id: number): CanonicalChain | undefined;
```

### `chainBySlug`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Exact slug match only (no normalization) - for callers that already hold a canonical slug.

```typescript theme={null}
export declare function chainBySlug(slug: string): CanonicalChain | undefined;
```

### `chainByAlias`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Normalized lookup across slug + name + aliases - resolves a human/legacy chain-name string.

```typescript theme={null}
export declare function chainByAlias(nameOrAlias: string): CanonicalChain | undefined;
```

### `resolveChain`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Unified front door: number/bigint -> chainById, string -> chainBySlug then chainByAlias, CanonicalChain -> identity.

```typescript theme={null}
export declare function resolveChain(ref: ChainRef): CanonicalChain | undefined;
```

### `requireChain`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

`resolveChain` or throw, naming the known set.

```typescript theme={null}
export declare function requireChain(ref: ChainRef): CanonicalChain;
```

### `isEvm`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Resolves `ref` then tests `kind === 'evm'`. False for an unresolvable ref.

```typescript theme={null}
export declare function isEvm(ref: ChainRef): boolean;
```

### `isSvm`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Resolves `ref` then tests `kind === 'svm'`. False for an unresolvable ref.

```typescript theme={null}
export declare function isSvm(ref: ChainRef): boolean;
```

### `isEvmChain`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Narrowing guard for a value already resolved.

```typescript theme={null}
export declare function isEvmChain(c: CanonicalChain): c is CanonicalChain & {
    kind: "evm";
};
```

### `isSvmChain`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Narrowing guard for a value already resolved.

```typescript theme={null}
export declare function isSvmChain(c: CanonicalChain): c is CanonicalChain & {
    kind: "svm";
};
```

### `evmChains`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Every EVM chain, id-ascending.

```typescript theme={null}
export declare function evmChains(): CanonicalChain[];
```

### `svmChains`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Every SVM chain, id-ascending.

```typescript theme={null}
export declare function svmChains(): CanonicalChain[];
```

### `canonicalChainSlugs`

*Function* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Every slug, id-ascending - for building the fluent accessor's key set.

```typescript theme={null}
export declare function canonicalChainSlugs(): ChainSlug[];
```

### `ChainKind`

*Type* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

The kind of VM a canonical chain runs: `"evm"`, or `"svm"` for Solana.

```typescript theme={null}
export type ChainKind = "evm" | "svm";
```

### `CanonicalChain`

*Interface* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

One chain of `CANONICAL_CHAINS`: its numeric `id`, its `slug`, its display `name`, its VM `kind`, and `aliases`, more spellings `resolveChain` and `chainByAlias` accept (case- and punctuation-insensitively, as they match `slug` and `name`). It names the chain only: native currency and explorers are in the `chains` record, which `getChain(id)` reads and which has no entry for some EVM chains and for Solana.

```typescript theme={null}
export interface CanonicalChain {
    readonly id: number;
    readonly slug: string;
    readonly name: string;
    readonly kind: ChainKind;
    readonly aliases: readonly string[];
}
```

### `CANONICAL_CHAINS`

*Variable* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

```typescript theme={null}
CANONICAL_CHAINS: readonly [
    {
        readonly id: 1;
        readonly slug: "ethereum";
        readonly name: "Ethereum";
        readonly kind: "evm";
        readonly aliases: readonly [
            "mainnet",
            "eth"
        ];
    },
    {
        readonly id: 10;
        readonly slug: "optimism";
        readonly name: "Optimism";
        readonly kind: "evm";
        readonly aliases: readonly [
            "op",
            "op-mainnet"
        ];
    },
    {
        readonly id: 56;
        readonly slug: "bsc";
        readonly name: "BNB Chain";
        readonly kind: "evm";
        readonly aliases: readonly [
            "bnb",
            "binance-smart-chain",
            "bnb-smart-chain"
        ];
    },
    {
        readonly id: 137;
        readonly slug: "polygon";
        readonly name: "Polygon";
        readonly kind: "evm";
        readonly aliases: readonly [
            "matic",
            "polygon-pos"
        ];
    },
    {
        readonly id: 8453;
        readonly slug: "base";
        readonly name: "Base";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 42161;
        readonly slug: "arbitrum";
        readonly name: "Arbitrum One";
        readonly kind: "evm";
        readonly aliases: readonly [
            "arb"
        ];
    },
    {
        readonly id: 42220;
        readonly slug: "celo";
        readonly name: "Celo";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 25;
        readonly slug: "cronos";
        readonly name: "Cronos";
        readonly kind: "evm";
        readonly aliases: readonly [
            "cro"
        ];
    },
    {
        readonly id: 100;
        readonly slug: "gnosis";
        readonly name: "Gnosis";
        readonly kind: "evm";
        readonly aliases: readonly [
            "xdai",
            "gnosis-chain"
        ];
    },
    {
        readonly id: 122;
        readonly slug: "fuse";
        readonly name: "Fuse";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 169;
        readonly slug: "manta";
        readonly name: "Manta Pacific";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 204;
        readonly slug: "opbnb";
        readonly name: "opBNB";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 250;
        readonly slug: "fantom";
        readonly name: "Fantom";
        readonly kind: "evm";
        readonly aliases: readonly [
            "ftm",
            "opera",
            "fantom-opera"
        ];
    },
    {
        readonly id: 288;
        readonly slug: "boba";
        readonly name: "Boba";
        readonly kind: "evm";
        readonly aliases: readonly [
            "boba-network"
        ];
    },
    {
        readonly id: 324;
        readonly slug: "zksync";
        readonly name: "zkSync Era";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 369;
        readonly slug: "pulsechain";
        readonly name: "PulseChain";
        readonly kind: "evm";
        readonly aliases: readonly [
            "pls"
        ];
    },
    {
        readonly id: 1088;
        readonly slug: "metis";
        readonly name: "Metis";
        readonly kind: "evm";
        readonly aliases: readonly [
            "andromeda",
            "metis-andromeda"
        ];
    },
    {
        readonly id: 1116;
        readonly slug: "core";
        readonly name: "Core";
        readonly kind: "evm";
        readonly aliases: readonly [
            "coredao",
            "core-dao"
        ];
    },
    {
        readonly id: 1284;
        readonly slug: "moonbeam";
        readonly name: "Moonbeam";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 1329;
        readonly slug: "sei";
        readonly name: "Sei";
        readonly kind: "evm";
        readonly aliases: readonly [
            "sei-evm"
        ];
    },
    {
        readonly id: 2222;
        readonly slug: "kava";
        readonly name: "Kava";
        readonly kind: "evm";
        readonly aliases: readonly [
            "kava-evm"
        ];
    },
    {
        readonly id: 5000;
        readonly slug: "mantle";
        readonly name: "Mantle";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 5042;
        readonly slug: "arc";
        readonly name: "Arc";
        readonly kind: "evm";
        readonly aliases: readonly [
            "arc-mainnet",
            "arc-network"
        ];
    },
    {
        readonly id: 7000;
        readonly slug: "zetachain";
        readonly name: "ZetaChain";
        readonly kind: "evm";
        readonly aliases: readonly [
            "zeta"
        ];
    },
    {
        readonly id: 8217;
        readonly slug: "klaytn";
        readonly name: "Klaytn";
        readonly kind: "evm";
        readonly aliases: readonly [
            "kaia"
        ];
    },
    {
        readonly id: 9001;
        readonly slug: "evmos";
        readonly name: "Evmos";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 34443;
        readonly slug: "mode";
        readonly name: "Mode";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 43114;
        readonly slug: "avalanche";
        readonly name: "Avalanche C-Chain";
        readonly kind: "evm";
        readonly aliases: readonly [
            "avax"
        ];
    },
    {
        readonly id: 59144;
        readonly slug: "linea";
        readonly name: "Linea";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 80094;
        readonly slug: "berachain";
        readonly name: "Berachain";
        readonly kind: "evm";
        readonly aliases: readonly [
            "bera"
        ];
    },
    {
        readonly id: 81457;
        readonly slug: "blast";
        readonly name: "Blast";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 534352;
        readonly slug: "scroll";
        readonly name: "Scroll";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 7777777;
        readonly slug: "zora";
        readonly name: "Zora";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 1313161554;
        readonly slug: "aurora";
        readonly name: "Aurora";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 84532;
        readonly slug: "base-sepolia";
        readonly name: "Base Sepolia";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 5042002;
        readonly slug: "arc-testnet";
        readonly name: "Arc Testnet";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 11155111;
        readonly slug: "sepolia";
        readonly name: "Ethereum Sepolia";
        readonly kind: "evm";
        readonly aliases: readonly [
            "ethereum-sepolia",
            "eth-sepolia"
        ];
    },
    {
        readonly id: 130;
        readonly slug: "unichain";
        readonly name: "Unichain";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 143;
        readonly slug: "monad";
        readonly name: "Monad";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 146;
        readonly slug: "sonic";
        readonly name: "Sonic";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 2020;
        readonly slug: "ronin";
        readonly name: "Ronin";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 9745;
        readonly slug: "plasma";
        readonly name: "Plasma";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 57073;
        readonly slug: "ink";
        readonly name: "Ink";
        readonly kind: "evm";
        readonly aliases: readonly [
        ];
    },
    {
        readonly id: 1399811149;
        readonly slug: "solana";
        readonly name: "Solana";
        readonly kind: "svm";
        readonly aliases: readonly [
            "sol",
            "mainnet-beta",
            "solana-mainnet"
        ];
    },
    {
        readonly id: 1399811150;
        readonly slug: "solana-devnet";
        readonly name: "Solana Devnet";
        readonly kind: "svm";
        readonly aliases: readonly [
            "devnet"
        ];
    },
    {
        readonly id: 1399811151;
        readonly slug: "solana-testnet";
        readonly name: "Solana Testnet";
        readonly kind: "svm";
        readonly aliases: readonly [
            "testnet"
        ];
    }
]
```

### `ChainSlug`

*Type* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

The literal slug union - what the fluent accessor and route shortcuts key their builder types off.

```typescript theme={null}
export type ChainSlug = (typeof CANONICAL_CHAINS)[number]["slug"];
```

### `canonicalChains`

*Variable* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce`

Widened alias for ordinary iteration/mapping.

```typescript theme={null}
canonicalChains: readonly CanonicalChain[]
```

### `ChainRef`

*Type* · `@eco-incorp/sauce/chains`, `@eco-incorp/sauce` as `routes.ChainRef`, `@eco-incorp/sauce`

Anything resolvable to a chain: a numeric id, a native-`bigint` id, a
slug/name/alias string, or an already-resolved `CanonicalChain`.

```typescript theme={null}
export type ChainRef = number | bigint | string | CanonicalChain;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.