Skip to main content
The 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.
Generated from the type declarations of @eco-incorp/sauce.

routes.knownTokenSymbols

Function · @eco-incorp/sauce Every symbol this registry knows for chain, sorted for stable diagnostics/tests.

routes.registryTokenAddress

Function · @eco-incorp/sauce The registry’s own value for symbol on chain, or undefined if unregistered: a token’s address on an EVM chain, a mint’s 32-byte key on Solana.

routes.registryTokens

Function · @eco-incorp/sauce Every registry token on chain, by symbol, each a frozen RegistryToken: an EVM chain’s tokens, or a Solana cluster’s registered mints. The same objects on every call. Empty for a chain the registry has no row for.

routes.resolveTokenMap

Function · @eco-incorp/sauce THE one precedence resolver every token-address consumer goes through: registry rows for chain first (an EVM chain’s tokens, an svm chain’s cluster mints as 32-byte keys), then callerTokens merged PER KEY on top — overriding one symbol (e.g. USDC) never drops an unrelated registry symbol (e.g. WETH) for the same chain. With no callerTokens, the chain’s registry map: the same map on every call.

routes.SVM_TOKEN_REGISTRY

Variable · @eco-incorp/sauce Registered SPL mints, per Solana cluster: a program compiled for solana resolves its symbols to mainnet-beta’s, one compiled for solana-devnet to devnet’s and one compiled for solana-testnet to testnet’s.

routes.svmTokenRows

Function · @eco-incorp/sauce The registered mints a program compiled for chain resolves its symbols to: none off SVM.

routes.TOKEN_REGISTRY

Variable · @eco-incorp/sauce Keyed by canonical EVM chain id (CanonicalChain.id).

routes.RegistryToken

Interface · @eco-incorp/sauce One registry token on one chain, as a chain export carries it (Base.USDC): the same row a compiled program’s USDC resolves to on that chain.

routes.StockToken

Interface · @eco-incorp/sauce What a stock row carries beyond a token’s (stock-tokens.ts).

routes.SvmTokenCluster

Type · @eco-incorp/sauce A Solana cluster a mint is registered on. mainnet-beta is the canonical solana chain.

routes.SvmTokenRow

Interface · @eco-incorp/sauce

routes.TokenRegistryRow

Interface · @eco-incorp/sauce

routes.STOCK_ISSUERS

Variable · @eco-incorp/sauce Each issuer’s name, the published list its rows are copied from, and whether its Solana mints charge a transfer fee (Token-2022’s TransferFee, withheld from what the recipient gets), which the evidence holds every mint to.

routes.stockSymbol

Function · @eco-incorp/sauce The registry symbol for an issuer’s symbol: the same, with a ”.” as ”_”.

routes.StockIssuer

Type · @eco-incorp/sauce An issuer whose list stock-tokens.generated.ts copies.