> ## 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: Address lookup tables

> Address lookup tables: the declaration and description of each of the 12 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`.

### `selectAltAddresses`

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

Picks the account addresses worth putting in a lookup table: non-signers
only (signers must be static message accounts - they cannot be looked up),
deduplicated in first-seen order.

```typescript theme={null}
export declare function selectAltAddresses(metas: readonly ResolvedAccountMeta[]): Address[];
```

### `createAltWithAddresses`

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

Creates an address lookup table and extends it with `addresses` (one create
transaction, then one transaction per chunk of 30 addresses - 27 when payer
and authority are distinct signers). Returns the table address and a slot
upper bound for the last extend - feed it to `waitForAltActive` before
compressing a transaction against the table.

More than LOOKUP\_TABLE\_MAX\_ADDRESSES addresses throws before the create
transaction is built, so no table is funded.

```typescript theme={null}
export declare function createAltWithAddresses({ rpc, payer, authority, addresses, sendAndConfirm, commitment, }: CreateAltInput): Promise<{
    lookupTableAddress: Address;
    lastExtendedSlot: bigint;
}>;
```

### `lookupTableBatches`

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

The transactions that create an address lookup table holding `addresses`, as instruction
batches to send in order (one create, then one extend per chunk of 30 addresses, 27 when payer
and authority are distinct signers), and the table's address. Sending them, and waiting a slot
past the last extend before compressing against the table, is the caller's:
`createAltWithAddresses` sends them through a confirmation callback, the `sauce` command with its
own sends.

More than LOOKUP\_TABLE\_MAX\_ADDRESSES addresses throws, so no table is funded.

```typescript theme={null}
export declare function lookupTableBatches({ payer, authority, recentSlot, addresses, }: LookupTableBatchesInput): Promise<{
    lookupTableAddress: Address;
    batches: Instruction[][];
}>;
```

### `extendAlt`

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

Appends `addresses` to an existing lookup table (one transaction per chunk of
30 - 27 with a distinct authority), returning a slot upper bound for the last
extend. Feed it to `waitForAltActive` before compressing against the table.
An empty `addresses` sends nothing and returns the current slot (the table is
already sufficient) - this is the idempotent no-op the reuse path relies on.

More than LOOKUP\_TABLE\_MAX\_ADDRESSES throws before the first chunk goes out:
the chunks are sent sequentially, so a set that cannot fit would otherwise
rent-fund a half-filled table before failing on-chain.

```typescript theme={null}
export declare function extendAlt({ rpc, payer, authority, lookupTableAddress, addresses, sendAndConfirm, commitment, }: ExtendAltInput): Promise<{
    lastExtendedSlot: bigint;
}>;
```

### `waitForAltActive`

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

Waits until the lookup table is usable. Addresses extended in slot N are
usable from slot N+1 onward, so this resolves once getSlot() > lastExtendedSlot.

```typescript theme={null}
export declare function waitForAltActive(rpc: Rpc<GetSlotApi>, lastExtendedSlot: bigint, { timeoutMs, pollMs }?: {
    timeoutMs?: number;
    pollMs?: number;
}): Promise<void>;
```

### `fetchAlt`

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

Fetches a lookup table in the shape `compressTransactionMessageUsingAddressLookupTables` consumes.

```typescript theme={null}
export declare function fetchAlt(rpc: Parameters<typeof fetchAddressLookupTable>[0], lookupTableAddress: Address): Promise<AddressesByLookupTableAddress>;
```

### `lookupTableAddresses`

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

The accounts of `transaction` a lookup table may hold: every account its message lists, less the
signers and the programs its instructions call, which a transaction must list itself. A table
over exactly these is the one a cook too wide for one transaction goes through.

```typescript theme={null}
export declare function lookupTableAddresses(transaction: Pick<Transaction, "messageBytes">): Address[];
```

### `LOOKUP_TABLE_MAX_ADDRESSES`

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

Hard on-chain capacity of one address lookup table (LOOKUP\_TABLE\_MAX\_ADDRESSES
in solana-program). The extend instruction that would cross it fails, and
because the extends are sent sequentially the earlier ones have already
landed - so callers must reject an oversized set BEFORE sending anything
rather than leave a half-filled, rent-funded table behind.

```typescript theme={null}
LOOKUP_TABLE_MAX_ADDRESSES = 256
```

### `SendAndConfirmTransaction`

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

```typescript theme={null}
export type SendAndConfirmTransaction = (transaction: SignedExecuteTransaction, config: {
    commitment: Commitment;
}) => Promise<void>;
```

### `CreateAltInput`

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

```typescript theme={null}
export interface CreateAltInput {
    rpc: Rpc<GetLatestBlockhashApi & GetSlotApi>;
    payer: TransactionSigner;
    authority: TransactionSigner;
    addresses: readonly Address[];
    sendAndConfirm: SendAndConfirmTransaction;
    commitment?: Commitment;
}
```

### `LookupTableBatchesInput`

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

```typescript theme={null}
export interface LookupTableBatchesInput {
    payer: TransactionSigner;
    authority: TransactionSigner;
    recentSlot: bigint;
    addresses: readonly Address[];
}
```

### `ExtendAltInput`

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

```typescript theme={null}
export interface ExtendAltInput {
    rpc: Rpc<GetLatestBlockhashApi & GetSlotApi>;
    payer: TransactionSigner;
    authority: TransactionSigner;
    lookupTableAddress: Address;
    addresses: readonly Address[];
    sendAndConfirm: SendAndConfirmTransaction;
    commitment?: Commitment;
}
```


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