> ## 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.

# actions: Lowering actions to Sauce

> Lowering actions to Sauce: 5 exports of the actions module of @eco-incorp/sauce, including actionsToSauce, actionsToSauceSource, actionToSauce, buildAction, ActionResult.

`@eco-incorp/sauce/actions` lowers routing intents into Sauce programs and carries the AMM and bridge action primitives.

```typescript theme={null}
import { actionsToSauce } from "@eco-incorp/sauce/actions";
```

This page covers `actions/dist/to-sauce.d.ts`.

<Note>
  Generated from the type declarations shipped in `@eco-incorp/sauce` 0.99.4. Each entry shows the package authors' JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see [architecture and deployments](/programmable-transactions/sauce/architecture-and-deployments).
</Note>

### `actionsToSauce`

*Function* · `actions/dist/to-sauce.d.ts`

```typescript theme={null}
export declare function actionsToSauce(actions: readonly RoutingAction[]): Uint8Array;
```

### `actionsToSauceSource`

*Function* · `actions/dist/to-sauce.d.ts`

The SauceScript source for `actions`. Empty for an empty list.

```typescript theme={null}
export declare function actionsToSauceSource(actions: readonly RoutingAction[]): string;
```

### `actionToSauce`

*Function* · `actions/dist/to-sauce.d.ts`

```typescript theme={null}
export declare function actionToSauce(action: RoutingAction): Uint8Array;
```

### `buildAction`

*Function* · `actions/dist/to-sauce.d.ts`

Emit the statements for one action.

BREAKING: this took a `Saucer` and a `Saucer` amount and returned builder nodes. It now takes an
\[`Emitter`] (from `newEmitter()`) and a SauceScript amount EXPRESSION, and returns source
fragments. `needsOutput` is the old `outputChained` under its real name: it both selects the
recipient (`ctx.self()` when the output is consumed here, the action's own `recipient` otherwise)
and decides whether a call's `uint256` return value is captured.

```typescript theme={null}
export declare function buildAction(emit: Emitter, action: RoutingAction, amountIn: Expr, needsOutput: boolean): ActionResult;
```

### `ActionResult`

*Interface* · `actions/dist/to-sauce.d.ts`

```typescript theme={null}
export interface ActionResult {
    readonly stmts: readonly Stmt[];
    readonly output: Expr;
}
```
