Skip to main content
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.
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.

chainById

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce O(1) lookup by numeric chain id.

chainBySlug

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Exact slug match only (no normalization) - for callers that already hold a canonical slug.

chainByAlias

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Normalized lookup across slug + name + aliases - resolves a human/legacy chain-name string.

resolveChain

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Unified front door: number/bigint -> chainById, string -> chainBySlug then chainByAlias, CanonicalChain -> identity.

requireChain

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce resolveChain or throw, naming the known set.

isEvm

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Resolves ref then tests kind === 'evm'. False for an unresolvable ref.

isSvm

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Resolves ref then tests kind === 'svm'. False for an unresolvable ref.

isEvmChain

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Narrowing guard for a value already resolved.

isSvmChain

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Narrowing guard for a value already resolved.

evmChains

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Every EVM chain, id-ascending.

svmChains

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Every SVM chain, id-ascending.

canonicalChainSlugs

Function · @eco-incorp/sauce/chains, @eco-incorp/sauce Every slug, id-ascending - for building the fluent accessor’s key set.

ChainKind

Type · @eco-incorp/sauce/chains, @eco-incorp/sauce The kind of VM a canonical chain runs: "evm", or "svm" for Solana.

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.

CANONICAL_CHAINS

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

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.

canonicalChains

Variable · @eco-incorp/sauce/chains, @eco-incorp/sauce Widened alias for ordinary iteration/mapping.

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.