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