Skip to main content
Archived documentation for @eco-incorp/sauce@0.99.16. Install this release with npm install --save-exact @eco-incorp/sauce@0.99.16. Links to guides outside this tab open current documentation.
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.