routes namespace compiles a SauceScript program for one chain by name and builds the calls that run it. routes.compileSauceProgram(chain, source, options?) compiles with the chain’s token symbols, protocol namespaces and @sauce/token in scope; routes.encodeEntryArguments(program, values) encodes main’s run-time arguments; routes.buildSauceEvmCall(params) builds one cook(engine, program) call on a Pot. The chain exports (Base, Solana, …), chain and Token are named exports of the root, and importing the package puts nothing on globalThis.
@eco-incorp/sauce.
Ethereum
Variable · @eco-incorp/sauce
The chain accessor for Ethereum (chain id 1).
Optimism
Variable · @eco-incorp/sauce
The chain accessor for Optimism (chain id 10).
Bsc
Variable · @eco-incorp/sauce
The chain accessor for BNB Chain (chain id 56).
Polygon
Variable · @eco-incorp/sauce
The chain accessor for Polygon (chain id 137).
Base
Variable · @eco-incorp/sauce
The chain accessor for Base (chain id 8453).
Arbitrum
Variable · @eco-incorp/sauce
The chain accessor for Arbitrum One (chain id 42161).
Celo
Variable · @eco-incorp/sauce
The chain accessor for Celo (chain id 42220).
Cronos
Variable · @eco-incorp/sauce
The chain accessor for Cronos (chain id 25).
Gnosis
Variable · @eco-incorp/sauce
The chain accessor for Gnosis (chain id 100).
Fuse
Variable · @eco-incorp/sauce
The chain accessor for Fuse (chain id 122).
Manta
Variable · @eco-incorp/sauce
The chain accessor for Manta Pacific (chain id 169).
Opbnb
Variable · @eco-incorp/sauce
The chain accessor for opBNB (chain id 204).
Fantom
Variable · @eco-incorp/sauce
The chain accessor for Fantom (chain id 250).
Boba
Variable · @eco-incorp/sauce
The chain accessor for Boba (chain id 288).
Zksync
Variable · @eco-incorp/sauce
The chain accessor for zkSync Era (chain id 324).
Pulsechain
Variable · @eco-incorp/sauce
The chain accessor for PulseChain (chain id 369).
Metis
Variable · @eco-incorp/sauce
The chain accessor for Metis (chain id 1088).
Core
Variable · @eco-incorp/sauce
The chain accessor for Core (chain id 1116).
Moonbeam
Variable · @eco-incorp/sauce
The chain accessor for Moonbeam (chain id 1284).
Sei
Variable · @eco-incorp/sauce
The chain accessor for Sei (chain id 1329).
Kava
Variable · @eco-incorp/sauce
The chain accessor for Kava (chain id 2222).
Mantle
Variable · @eco-incorp/sauce
The chain accessor for Mantle (chain id 5000).
Arc
Variable · @eco-incorp/sauce
The chain accessor for Arc (chain id 5042).
Zetachain
Variable · @eco-incorp/sauce
The chain accessor for ZetaChain (chain id 7000).
Klaytn
Variable · @eco-incorp/sauce
The chain accessor for Klaytn (chain id 8217).
Evmos
Variable · @eco-incorp/sauce
The chain accessor for Evmos (chain id 9001).
Mode
Variable · @eco-incorp/sauce
The chain accessor for Mode (chain id 34443).
Avalanche
Variable · @eco-incorp/sauce
The chain accessor for Avalanche C-Chain (chain id 43114).
Linea
Variable · @eco-incorp/sauce
The chain accessor for Linea (chain id 59144).
Berachain
Variable · @eco-incorp/sauce
The chain accessor for Berachain (chain id 80094).
Blast
Variable · @eco-incorp/sauce
The chain accessor for Blast (chain id 81457).
Scroll
Variable · @eco-incorp/sauce
The chain accessor for Scroll (chain id 534352).
Zora
Variable · @eco-incorp/sauce
The chain accessor for Zora (chain id 7777777).
Aurora
Variable · @eco-incorp/sauce
The chain accessor for Aurora (chain id 1313161554).
BaseSepolia
Variable · @eco-incorp/sauce
The chain accessor for Base Sepolia (chain id 84532).
ArcTestnet
Variable · @eco-incorp/sauce
The chain accessor for Arc Testnet (chain id 5042002).
Sepolia
Variable · @eco-incorp/sauce
The chain accessor for Ethereum Sepolia (chain id 11155111).
Unichain
Variable · @eco-incorp/sauce
The chain accessor for Unichain (chain id 130).
Monad
Variable · @eco-incorp/sauce
The chain accessor for Monad (chain id 143).
Sonic
Variable · @eco-incorp/sauce
The chain accessor for Sonic (chain id 146).
Ronin
Variable · @eco-incorp/sauce
The chain accessor for Ronin (chain id 2020).
Plasma
Variable · @eco-incorp/sauce
The chain accessor for Plasma (chain id 9745).
Ink
Variable · @eco-incorp/sauce
The chain accessor for Ink (chain id 57073).
Solana
Variable · @eco-incorp/sauce
The chain accessor for Solana (chain id 1399811149).
SolanaDevnet
Variable · @eco-incorp/sauce
The chain accessor for Solana Devnet (chain id 1399811150).
SolanaTestnet
Variable · @eco-incorp/sauce
The chain accessor for Solana Testnet (chain id 1399811151).
Token
Variable · @eco-incorp/sauce
Universal token interface - ERC20 on EVM targets, SPL Token on svm. Callable as
Token(addr) in a route body (the wrapper, rewritten to IERC20.at(addr)), and carries
the runtime spec-object API for use outside one.
chain
Function · @eco-incorp/sauce as routes.chain, @eco-incorp/sauce
Dynamic front door for a runtime-resolved chain (chain('eth'),
chain(8453), chain('BNB Chain')) - delegates to requireChain, so it
inherits the registry’s alias resolution and unknown-chain throw.
routes.chainAccessors
Variable · @eco-incorp/sauce
The generated record: const { Base, Solana, Ethereum } = chainAccessors; — each entry a
namespace with .chain.
routes.pascalOfSlug
Function · @eco-incorp/sauce
PascalOf’s runtime mirror: split on -, upper-case each segment’s first
character, join.
routes.PascalOf
Type · @eco-incorp/sauce
PascalOf<"bnb-chain"> = "BnbChain". Matches the runtime pascal()
derivation in accessors.ts by construction (both reduce to
Capitalize<S> composed across --separated segments) — re-exported from
accessors.ts so callers only need one import site.
routes.createChainGlobals
Function · @eco-incorp/sauce
Generates the top-level chain globals from ../chains/canonical.js —
adding a chain to CANONICAL_CHAINS adds a global here with zero code
changes; a duplicate PascalCase key (two slugs colliding after casing)
throws at module-eval time rather than silently overwriting one with
another.
routes.makeChainGlobal
Function · @eco-incorp/sauce
Builds the ChainGlobal for chain — what a generated export (Base) or chain(ref) returns:
chain, enumerable, so Object.keys(chainAccessors.Base) is exactly ["chain"].
routes.ChainGlobal
Interface · @eco-incorp/sauce
A chain export: .chain.
routes.ChainGlobals
Type · @eco-incorp/sauce
One generated ChainGlobal per canonical chain slug, PascalCase-keyed.
routes.composedChainGlobal
Function · @eco-incorp/sauce
The composed accessor for one PascalCase chain name, memoised. Returns
unknown because the per-chain type is only known where the name is a
literal: chain-exports.generated.ts declares it (svm chains additionally
carry SvmVenueAccessors), which is exactly the cast the generator emits.
routes.composedChainGlobals
Function · @eco-incorp/sauce
Every canonical chain, composed and memoised, PascalCase-keyed — what
installRouteGlobals() installs. Registry-derived: it enumerates
chainAccessors, so adding a chain to CANONICAL_CHAINS adds an entry
here with no code change.
installRouteGlobals
Function · @eco-incorp/sauce
Installs every chain accessor (PascalCase-keyed, e.g. Base, Solana)
plus, by default, chain and Token onto target (default globalThis).
Never overwrites a name already present: uses the in operator (not an
undefined check), so an inherited or getter-only property on the target
still counts as “taken” and is skipped, not clobbered. Every installed
property is enumerable: false (so ~40 names don’t show up in
Object.keys(globalThis)/for...in) and configurable: true (so
uninstallRouteGlobals can genuinely remove it).
The chain values are the SAME objects the named exports hand out
(Base === globalThis.Base after this call) — composition is memoised in
./composed.js.
uninstallRouteGlobals
Function · @eco-incorp/sauce
Removes every name this module has installed (across all calls) from
target (default globalThis) and clears the internal bookkeeping, so a
later installRouteGlobals() reinstalls cleanly rather than skipping.
routeGlobals
Variable · @eco-incorp/sauce
The most recent installRouteGlobals() result — EMPTY until a host calls
it, because importing the SDK installs nothing. A live view rather than a
frozen snapshot, so it can never claim an install that has since been
undone; uninstallRouteGlobals() resets it.
