> ## 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 venue: tesserav

> 27 exports of the tesserav venue integration in @eco-incorp/sauce/svm, including pickTesseraVVault, level0PriceOffset, level0CumOffset, fetchTesseraVConfig, TESSERAV_PROGRAM_ID, TOKEN_PROGRAM.

Solana venue integration `tesserav` under `svm/venues/tesserav`.

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

### `pickTesseraVVault`

*Function* · `sdk/dist/svm/venues/tesserav/index.d.ts`

Exclude-ATA vault picker - the GENERAL derivation core. Of the legacy-SPL
token accounts owned by `owner` for `mint`, drop the canonical
ATA(owner, mint, TOKEN\_PROGRAM) (observed as a dust account for USDC: the
real vault 9t4P5w… alongside its ATA at \~50000) and return the single
remainder. 0 remainders → null (the global vault does not exist yet →
self-drop). >1 remainders → the largest-balance one when balances are known,
else null (ambiguous → self-drop rather than guess) - the caveat the debug
flagged for the >1 case.

```typescript theme={null}
export declare function pickTesseraVVault(owner: Address, mint: Address, owned: readonly TesseraVOwnedTokenAccount[]): Promise<Address | null>;
```

### `level0PriceOffset`

*Function* · `sdk/dist/svm/venues/tesserav/index.d.ts`

Level-0 price (ppm of 1e6) for a direction - non-increasing across slots, this adapter ships slot 0 only.

```typescript theme={null}
export declare function level0PriceOffset(direction: "aToB" | "bToA"): number;
```

### `level0CumOffset`

*Function* · `sdk/dist/svm/venues/tesserav/index.d.ts`

Level-0 capacity, in OUTPUT-token raw units, for a direction.

```typescript theme={null}
export declare function level0CumOffset(direction: "aToB" | "bToA"): number;
```

### `fetchTesseraVConfig`

*Function* · `sdk/dist/svm/venues/tesserav/index.d.ts`

Fetch + gate one TesseraV pool. Read-only against the loader. Gates: wrong
owner/size, an unprimed mid (0 - a pool the maker bot has never quoted),
and a zero/absent level-0 price or capacity (an empty book for this
direction - self-drop, not a revert, at the orchestrator layer).

```typescript theme={null}
export declare function fetchTesseraVConfig(load: AccountLoader, pool: Address, direction: "aToB" | "bToA", resolveVault?: TesseraVVaultResolver): Promise<TesseraVPoolConfig>;
```

### `TESSERAV_PROGRAM_ID`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
TESSERAV_PROGRAM_ID: Address<"TessVdML9pBGgG9yGks7o4HewRaXVAMuoVj4x83GLQH">
```

### `TOKEN_PROGRAM`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
TOKEN_PROGRAM: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">
```

### `OFF_MID`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
OFF_MID = 144
```

### `MID_SCALE`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
MID_SCALE = 1000000000000000n
```

### `OFF_LADDER_AB`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
OFF_LADDER_AB = 168
```

### `AB_STRIDE`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
AB_STRIDE = 24
```

### `AB_OFF_PRICE`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
AB_OFF_PRICE = 0
```

### `AB_OFF_CUM`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
AB_OFF_CUM = 16
```

### `OFF_LADDER_BA`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
OFF_LADDER_BA = 640
```

### `BA_STRIDE`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
BA_STRIDE = 24
```

### `BA_OFF_CUM`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
BA_OFF_CUM = 0
```

### `BA_OFF_PRICE`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
BA_OFF_PRICE = 8
```

### `TESSERAV_LEVEL_SLOTS`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
TESSERAV_LEVEL_SLOTS = 10
```

### `PRICE_PPM_DEN`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
PRICE_PPM_DEN = 1000000n
```

### `TESSERAV_MIN_POOL_SIZE`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

Minimum pool account size this adapter reads from (level 9's last byte + 1).

```typescript theme={null}
TESSERAV_MIN_POOL_SIZE: number
```

### `TesseraVPoolConfig`

*Interface* · `sdk/dist/svm/venues/tesserav/index.d.ts`

```typescript theme={null}
export interface TesseraVPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "aToB" | "bToA";
    mintA: Address;
    mintB: Address;
    auth: Address;
    vaultA: Address;
    vaultB: Address;
    swapGlobalAccounts: readonly Address[];
}
```

### `TESSERAV_GLOBAL_AUTH`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

The TesseraV vault-AUTHORITY - a FIXED GLOBAL SINGLETON, correcting the
earlier "per-pool fact" framing. It is one program-owned (owner =
TessVdML…), 10240-byte account that is byte-identical as the swap CPI's
account\[0] across every pool traced (SOL/USDC, cbBTC/USDC, BONK/USDC). It is
NOT a PDA of the program under any tried seed, and NOT a mint→vault registry
(the 10240 bytes contain none of the mint or vault bytes) - so it is carried
as this verified constant, never derived. Verified against live swap-CPI
traces (SOL/USDC sig 3p2JFpLN…, cbBTC/USDC sig 4KZPEcyC…, BONK/USDC sig
3JZMZyMy…), all giving account\[0] = 8ekCy2….

```typescript theme={null}
TESSERAV_GLOBAL_AUTH: Address<"8ekCy2jHHUbW2yeNGFWYJT9Hm9FW7SvZcZK66dSZCDiF">
```

### `TESSERAV_SWAP_TAG`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

The swap instruction discriminator. The mainnet upgrade bumped it 0x10 ->
0x11 (see the SWAP CPI note in this file's header); a program compiled to the
old 0x10 tag now reverts. Exported so the downstream CPI builder reads the tag
from one place rather than hardcoding it.

```typescript theme={null}
TESSERAV_SWAP_TAG = 17
```

### `TESSERAV_SWAP_GLOBAL_ACCOUNTS`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

The three GLOBAL read-only accounts the upgraded swap ix (tag 0x11) APPENDS
after the two token-program slots - wire positions \[11], \[12], \[13]. ORDER IS
LOAD-BEARING.

These are program GLOBALS, not per-pool PDAs, and are carried as verified
CONSTANTS for exactly the reason TESSERAV\_GLOBAL\_AUTH is: they were BYTE-
IDENTICAL across 25 landing swaps on 3 distinct pools (SOL/USDC `FLckH…`,
`Ce8W…`, `7sJf…`) on 2026-09-11, all read-only - so there is nothing per-pool
to derive. (Deriving a per-pool PDA here would be WRONG: the chain shows one
fixed trio for every pool.) There is no on-chain IDL (closed-source), so the
names below are ROLES INFERRED from each account's on-chain owner/size, not
asserted semantics - re-verify on any re-capture:
\[0] 8xeaWCsJ…tb3d - owner = System Program, 0 bytes  → global authority/holder
\[1] BAT1Ndpu…vdhK - owner = TessVdML… (the program), 2048 bytes → global config/state
\[2] 4cG31VNF…brhPs - owner = tickUcs…ULWY6N (a tick/oracle program), 88 bytes → global oracle/tick
Verified against landing swap sig `3ViRTJm9…` (positions 11-13).

```typescript theme={null}
TESSERAV_SWAP_GLOBAL_ACCOUNTS: readonly Address[]
```

### `TESSERAV_KNOWN_VAULTS`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

Committed global-per-mint vault cache. Each TesseraV vault is a plain
keypair-generated legacy-SPL token account that is (a) authority =
TESSERAV\_GLOBAL\_AUTH and (b) GLOBAL PER MINT - one shared vault per token,
reused by every pool touching that token (measured: the SOL/USDC and
cbBTC/USDC pools share the SAME USDC vault 9t4P5w…). Vaults are stable, so
this map is the RPC-free fast path; a mint NOT here resolves through the
optional `resolveVault` (getTokenAccountsByOwner) arg of fetchTesseraVConfig - which `pickTesseraVVault` implements - or self-drops. Refresh this map with
that same owner-scoped sweep, keyed off TESSERAV\_GLOBAL\_AUTH. Only vaults
verified byte-exactly against a live swap-CPI trace are seeded here.

```typescript theme={null}
TESSERAV_KNOWN_VAULTS: Readonly<Record<string, Address>>
```

### `TesseraVOwnedTokenAccount`

*Interface* · `sdk/dist/svm/venues/tesserav/index.d.ts`

One legacy-SPL token account owned by an authority, as returned by an RPC
`getTokenAccountsByOwner(owner, { mint })`. `amount` (the u64 token balance)
is optional and consulted ONLY to break a >1 ambiguity (largest wins).

```typescript theme={null}
export interface TesseraVOwnedTokenAccount {
    address: Address;
    amount?: bigint;
}
```

### `TesseraVVaultResolver`

*Type* · `sdk/dist/svm/venues/tesserav/index.d.ts`

Resolver for a global-per-mint TesseraV vault: given the authority and a
mint, return the vault address, or null to self-drop when no vault exists
yet. A real caller backs this with an RPC
`getTokenAccountsByOwner(owner, { mint })` fed through `pickTesseraVVault`.
Threaded into fetchTesseraVConfig because the single-account AccountLoader
cannot express an owner-scoped scan.

```typescript theme={null}
export type TesseraVVaultResolver = (owner: Address, mint: Address) => Promise<Address | null>;
```

### `tesserav`

*Variable* · `sdk/dist/svm/venues/tesserav/index.d.ts`

Family facade for the recipe orchestrator (ladder-only - not in the v1 registry).

```typescript theme={null}
tesserav: {
    slug: string;
    programId: Address<"TessVdML9pBGgG9yGks7o4HewRaXVAMuoVj4x83GLQH">;
    tokenProgram: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">;
    fetchPoolConfig: typeof fetchTesseraVConfig;
}
```
