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

# svm: Router swap data

> Router swap data: the declaration and description of each of the 3 exports of @eco-incorp/sauce/svm.

`@eco-incorp/sauce/svm` is the Solana side: the client (`createSauceSvmClient`), clusters, PDAs, account resolution against the compiler's account manifest, Kitchen and engine instructions, transactions and sending, token accounts, and compute planning for `@sauce/router`'s Solana venues. `@eco-incorp/sauce/svm/engine` exports the engine's wire format and instruction builders, `@eco-incorp/sauce/svm/verify` verifies settle programs and engine CPI data, and `@eco-incorp/sauce/svm/engine-artifacts` (Node only) returns file paths to the packaged engine and Kitchen binaries.

```typescript theme={null}
import { createSauceSvmClient, SOLANA_CLUSTERS } from "@eco-incorp/sauce/svm";
```

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

### `routerSvmDataTemplate`

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

The data of `venue`'s swap around its amount, every other field checked and written. Throws for a
field the venue's instruction does not carry, or one past its slot.

```typescript theme={null}
export declare function routerSvmDataTemplate(venue: RouterSvmVenue, options: RouterSvmDataOptions): RouterSvmDataTemplate;
```

### `RouterSvmDataOptions`

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

```typescript theme={null}
export interface RouterSvmDataOptions {
    readonly aToB: boolean;
    readonly limit?: bigint;
    readonly minOut?: bigint;
    readonly v2?: boolean;
    readonly ticks?: bigint;
    readonly lot?: bigint;
    readonly baseLot?: bigint;
    readonly quoteLot?: bigint;
    readonly priceLots?: bigint;
    readonly orders?: bigint;
    readonly inIndex?: bigint;
    readonly outIndex?: bigint;
    readonly inCalcAccounts?: bigint;
    readonly outCalcAccounts?: bigint;
    readonly instrId?: bigint;
}
```

### `RouterSvmDataTemplate`

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

A swap's data around its amount: `prefix ‖ u64le(amountIn / divisor) ‖ suffix`.

```typescript theme={null}
export interface RouterSvmDataTemplate {
    readonly prefix: Uint8Array;
    readonly suffix: Uint8Array;
    readonly divisor: bigint;
}
```


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