Skip to main content
Two registries ship: CANONICAL_CHAINS (40 chains, 39 EVM plus Solana) read by requireChain, resolveChain and the slug and id lookups, and the chains record read by getChain, which carries 33 of the EVM chains. The same exports are available from the root and from @eco-incorp/sauce/chains. This page covers sdk/dist/chains/canonical.d.ts.
Generated from the type declarations shipped in @eco-incorp/sauce 0.99.4. Each entry shows the package authors’ JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see architecture and deployments.

routes.ChainRef

Type · sdk/dist/chains/canonical.d.ts Anything resolvable to a chain: a numeric id, a native-bigint id (eco-routes uses these), a slug/name/alias string, or an already-resolved CanonicalChain.

normalizeChainKey

Function · sdk/dist/chains/canonical.d.ts The ONE normalizer: lowercased, trimmed, punctuation/whitespace stripped.

chainById

Function · sdk/dist/chains/canonical.d.ts O(1) lookup by numeric chain id.

chainBySlug

Function · sdk/dist/chains/canonical.d.ts Exact slug match only (no normalization) - for callers that already hold a canonical slug.

chainByAlias

Function · sdk/dist/chains/canonical.d.ts Normalized lookup across slug + name + aliases - resolves a human/legacy chain-name string.

resolveChain

Function · sdk/dist/chains/canonical.d.ts Unified front door: number/bigint -> chainById, string -> chainBySlug then chainByAlias, CanonicalChain -> identity.

requireChain

Function · sdk/dist/chains/canonical.d.ts resolveChain or throw, mirroring requireV12Deployment’s existing throw-with-the-known-set style.

isEvm

Function · sdk/dist/chains/canonical.d.ts Resolves ref then tests kind === 'evm'. False for an unresolvable ref.

isSvm

Function · sdk/dist/chains/canonical.d.ts Resolves ref then tests kind === 'svm'. False for an unresolvable ref.

isEvmChain

Function · sdk/dist/chains/canonical.d.ts Narrowing guard for a value already resolved.

isSvmChain

Function · sdk/dist/chains/canonical.d.ts Narrowing guard for a value already resolved.

evmChains

Function · sdk/dist/chains/canonical.d.ts Every EVM chain, id-ascending.

svmChains

Function · sdk/dist/chains/canonical.d.ts Every SVM chain, id-ascending.

canonicalChainSlugs

Function · sdk/dist/chains/canonical.d.ts Every slug, id-ascending - for building the fluent accessor’s key set.

ChainKind

Type · sdk/dist/chains/canonical.d.ts CANONICAL CHAIN REGISTRY - identity only, additive, zero runtime coupling. chains (./index.ts) is EVM-only and has no slug; ../deployments/ knows chain SLUGS but only for the 12 chains in the v12 deploy record, and only gated on whether the stack is LIVE there. Neither answers the plain question “what is this chain called, and what kind of VM does it run” for the full union - including the 5 v12-only EVM chains and Solana, which have no chains entry at all. This module is a flat, hand-maintained data table answering exactly that question, for both EVM and SVM chains in ONE numeric id space. It carries no rpcUrls / nativeCurrency / blockExplorerUrls / testnet - those already live on chains for the ids that have them; a consumer needing that data still goes through getChain(id), which returns undefined for the 5 v12-only EVM chains and for Solana. Deliberately NOT wired to ../deployments/ or ../protocols/ - no import cycle, no runtime coupling. v12ChainSlug/v12LiveChainSlugs answer “can I cook here”, a LIVENESS question; this module answers “what is this chain called”, an IDENTITY question. Ronin (2020) is registered here even though its v12 deploy failed - see test/chains-canonical.test.ts for the pinned proof that the two layers are intentionally decoupled. MAINTENANCE NOTE: this table is hand-maintained, not derived. A chain added to chains (./index.ts) or to V12_EVM_CHAINS (../deployments/v12.generated.ts, rewritten by sync-engine-artifacts on every engine repin) will fail test/chains-canonical.test.ts until a matching entry is added here - that is the intended fail-closed behavior, not a test to relax.

CanonicalChain

Interface · sdk/dist/chains/canonical.d.ts Identity-only record for one chain: what it is called and what kind of VM it runs. Deliberately NOT a superset of Chain (../core/types.js) - see the module doc comment above for why.

CANONICAL_CHAINS

Variable · sdk/dist/chains/canonical.d.ts

ChainSlug

Type · sdk/dist/chains/canonical.d.ts The literal slug union - what the fluent accessor and route shortcuts key their builder types off.

canonicalChains

Variable · sdk/dist/chains/canonical.d.ts Widened alias for ordinary iteration/mapping.