> ## 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: Split swaps

> Split swaps: the declaration and description of each of the 2 exports of @eco-incorp/sauce/actions.

`@eco-incorp/sauce/actions` reads JSON action programs (`{ version, chainId?, actions }`), validates them against the JSON Schema exported as `@eco-incorp/sauce/actions/action-program.schema.json`, and compiles them for a chain. A token field takes a registry symbol and a contract field a namespace reference, beside an address.

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

Generated from the type declarations of `@eco-incorp/sauce`.

### `compileSplitSwap`

*Function* · `@eco-incorp/sauce/actions`

Compiles a split swap into one program. It takes no runtime arguments.

```typescript theme={null}
export declare function compileSplitSwap(swap: SplitSwap): CompiledProgram;
```

### `SplitSwap`

*Interface* · `@eco-incorp/sauce/actions`

A swap of `amount` split greedily, `buckets` slices at a time, across `candidates`.

```typescript theme={null}
export interface SplitSwap {
    readonly candidates: readonly SwapAction[];
    readonly amount: string;
    readonly buckets: number;
    readonly amountOutMin: string;
    readonly approvals?: readonly ApproveAction[];
    readonly sweep?: {
        readonly token: Token;
        readonly recipient: Recipient;
    };
    readonly quoters?: QuoteOptions;
    readonly chain?: ChainRef;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.