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

# deposit: Deposit source emission

> Deposit source emission: the declaration and description of each of the 4 exports of @eco-incorp/sauce.

The `deposit` namespace emits a program that makes protocol deposits, withdrawals, stakes or wraps from data. `deposit.depositSource(spec)` returns a `function main()` program with each call and its approval, which `routes.compileSauceProgram` compiles; `deposit.listDepositTemplates()` lists the supported calls, one template per protocol and action (`aave-v3` `supply`, `lido` `stake`, `weth` `unwrap`, ...).

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

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

### `deposit.depositCallStatement`

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

One deposit's full statement block (any `"balance"` binding line, the approve line if
applicable, then the protocol call) for `spec` - for splicing into a larger, hand-written
program. `varSuffix` disambiguates EVERY local this block binds - the `depositAmtN` balance read
and a template's own selector const - when several deposits share one program (`depositSource`
passes the spec's own index).

```typescript theme={null}
export declare function depositCallStatement(spec: DepositSourceSpec, varSuffix?: string): string;
```

### `deposit.depositImportLines`

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

The import lines a `depositSource(specs)` program needs: each resolved template's own
`imports`, plus `IERC20` iff any spec needs an approval or an ERC20 balance read. De-duped by
exact line, in first-seen order, with `IERC20` first.

```typescript theme={null}
export declare function depositImportLines(specs: DepositSourceSpec | readonly DepositSourceSpec[]): readonly string[];
```

### `deposit.depositSource`

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

A complete, compilable `function main() { ... }` program: one deposit statement block per spec,
in the given order, inside ONE function.

```typescript theme={null}
export declare function depositSource(spec: DepositSourceSpec | readonly DepositSourceSpec[], opts?: DepositSourceOptions): string;
```

### `deposit.DepositSourceOptions`

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

```typescript theme={null}
export interface DepositSourceOptions {
    functionName?: string;
    imports?: readonly string[];
}
```


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