> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sauce SDK overview

> The Sauce SDK is @eco-incorp/sauce (route syntax and intent builders, program builders, registries, release addresses, Solana client, verification) with @eco-incorp/sauce-compiler (the SauceScript compiler as WebAssembly) as a dependency. Requirements, install, import forms, subpaths, versioning and how to read this reference.

Sauce lets you write transaction logic in SauceScript, a TypeScript subset, compile it to bytecode, and execute it atomically against live onchain state in one transaction. The SDK reference groups exported declarations by namespace, with the package authors' JSDoc reproduced as written. The compiler has a separate API reference. Dependency re-exports and protocol-specific subpaths are covered by the linked package documentation and representative subpath reference. The guided path is under [Programmable Transactions](/programmable-transactions/overview).

## Packages

| Package | Version | Runtime | What it is |
| - | - | - | - |
| `@eco-incorp/sauce` | 0.99.4 | Node 24 or later | The SDK: chain globals and `routes` (`Base(body, options).reward(...)`, `.nest(...)`, Portal helpers), `token`, `swap` and `deposit` builders, `contracts` accessors, chain and protocol registries, release addresses, the Solana Kitchen client, settlement verification, and the compiler as a dependency. |
| `@eco-incorp/sauce-compiler` | 2.3.0 | Node and browsers | The SauceScript compiler compiled to WebAssembly, with Node and browser builds. Exposed in Node as `@eco-incorp/sauce/compiler`. |

This documentation uses SDK 0.99.4 and compiler 2.3.0. The SDK also bundles its own Markdown manual and checked examples under `docs/`, readable on [unpkg](https://unpkg.com/@eco-incorp/sauce@0.99.4/docs/README.md) or in `node_modules/@eco-incorp/sauce/docs` after installation.

## Install

```bash theme={null}
npm install --save-exact @eco-incorp/sauce@0.99.4
```

Install the compiler separately when you need compilation without the SDK, including in a browser:

```bash theme={null}
npm install --save-exact @eco-incorp/sauce-compiler@2.3.0
```

## Node and browsers

The root SDK, its `/compiler` export, route compilation, recipe and skill loaders and artifact resolvers use Node APIs. `/verify` depends on `viem` only and validates EVM settlement payloads in a browser or edge runtime without loading the compiler. The compiler package has its own browser build, initialized with `ready()` from `@eco-incorp/sauce-compiler/ready`.

## Import forms

```typescript theme={null}
import "@eco-incorp/sauce";                       // installs Base, Ethereum, Solana, Token and the other chain globals
import { routes, token, swap, deposit, contracts } from "@eco-incorp/sauce";
import { requireChain, listProtocols, getProtocol } from "@eco-incorp/sauce";
import { compile, encodeCompactArguments } from "@eco-incorp/sauce/compiler";
import { v12EngineAddress, v12KitchenAddress, v12SvmEngineProgramId } from "@eco-incorp/sauce/deployments";
import { createSauceSvmClient } from "@eco-incorp/sauce/svm";
import { validateSettleProgram } from "@eco-incorp/sauce/verify";
```

Importing the root package installs one global per canonical chain (`Base`, `Ethereum`, `Solana`, ...) plus `Token` on `globalThis`. They are not named exports, so `import { Base }` fails; use a side-effect import, since a type-only import does not install them. Opt out with `globalThis.__ECO_ROUTES_NO_GLOBALS__ = true` before the first import, or call `uninstallRouteGlobals()`; `routes.openRoute` and `contracts.on(chain)` are the import-based equivalents. Bare route names such as `USDC` and `Uniswap` are compiled route syntax with generated TypeScript declarations, not host objects.

## Subpaths

| Subpath | Reference section |
| - | - |
| `.` | [routes](/sdk-reference/sauce/routes/open-route), [token](/sdk-reference/sauce/token/api), [swap](/sdk-reference/sauce/swap/api), [deposit](/sdk-reference/sauce/deposit/api), [contracts](/sdk-reference/sauce/contracts/descriptors), [chains](/sdk-reference/sauce/chains/canonical), [protocols](/sdk-reference/sauce/protocols/registry) |
| `/compiler` | [compiler](/sdk-reference/sauce/compiler/compile) and [compact arguments](/sdk-reference/sauce/compiler/compact-arguments) |
| `/actions` | [actions](/sdk-reference/sauce/actions/types) |
| `/protocols/*` | [protocols](/sdk-reference/sauce/protocols/registry) |
| `/chains` | [chains](/sdk-reference/sauce/chains/canonical) |
| `/recipes`, `/recipes/settle.sauce.ts` | [recipes](/sdk-reference/sauce/recipes/settle) |
| `/deployments` | [deployments](/sdk-reference/sauce/deployments/current-addresses) |
| `/skills` | [skills loader](/sdk-reference/sauce/protocols/skills) |
| `/svm`, `/svm/engine`, `/svm/engine-artifacts`, `/svm/verify`, `/svm/recipes/settle.sauce.ts` | [svm](/sdk-reference/sauce/svm/client) and [svm venues](/sdk-reference/sauce/svm-venues/shared) |
| `/evm/engine` | [evm/engine](/sdk-reference/sauce/evm-engine/pot-and-kitchen) |
| `/verify` | [verify](/sdk-reference/sauce/verify/decode) |

There is no `/routes`, `/token`, `/swap`, `/deposit` or `/contracts` subpath; import those namespaces from the root.

## Versioning

On a `0.x` SDK version the API is not stable and a breaking change is a minor bump, so pin exactly. The compiler follows semver: on `1.x` and later a breaking change to the JS API or to accepted SauceScript syntax is a major bump; new language features, options and exports are minor. A compiler release can change the bytecode a program compiles to without changing the API, so recompile and re-pin cached programs after upgrading. Current pins: compiler 2.3.0, EVM engine 1.0.1, SVM engine 1.2.0, both Kitchens 1.0.0.

## How to read the reference

Each namespace or subpath is a sidebar section with one page per source module; a page lists that module's exports in declaration order. An entry has the export name, its kind, the declaration file inside the package, the JSDoc the package authors wrote, and the TypeScript declaration. Declarations longer than a few thousand characters (large ABI constants) are truncated with a marker. The generated reference omits declarations owned by dependencies. Compiler types are documented in the [compiler API](/sdk-reference/sauce-compiler/api); protocol subpaths share the shape shown for [Uniswap V3](/sdk-reference/sauce/protocols/uniswap-v3-subpath).

## Next steps

<CardGroup cols={3}>
  <Card title="Getting started" icon="play" href="/sdk-reference/sauce/getting-started">
    Compile a standalone program and inspect deployment registries.
  </Card>

  <Card title="routes" icon="route" href="/sdk-reference/sauce/routes/open-route">
    `openRoute`, `IntentOptions`, `PendingSauceRoute`, `BuiltIntent`, Portal helpers.
  </Card>

  <Card title="Compiler package" icon="microchip" href="/sdk-reference/sauce-compiler/api">
    `compile`, `ready`, `CompileOptions`, `CompileResult`, `AccountManifest`.
  </Card>
</CardGroup>
