> ## 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: Account resolution

> Account resolution: the declaration and description of each of the 5 exports of @eco-incorp/sauce/svm.

> [!NOTE]
>
> Archived documentation for `@eco-incorp/sauce@0.99.16`. Install this release with `npm install --save-exact @eco-incorp/sauce@0.99.16`. Links to guides outside this tab open current documentation.

`@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`.

### `resolveAccounts`

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

Resolves an AccountManifest into ordered account metas: metas\[i] is
user-account index i of the execute instruction (inline: instruction account
i; staged: i + 1, after the buffer). The base role comes from the slot's
`requires`; the resolution entry's signer flag then replaces it (see
`AccountResolution`), and a TransactionSigner or the reserved PAYER\_REF sets
it. An attached
TransactionSigner rides on the meta so the transaction builder signs with it.
Duplicate addresses across refs are fine - Solana dedupes at message compile.

A `remaining` entry is a POSITION, not an account: it marks where the
caller's own variable-length tail begins, so resolution stops there and the
caller appends its tail itself. It must be the LAST entry, and one that is not
throws - stopping early would drop the slots after it from `metas` and shift
the index of every account the caller then appends.

MSG\_SENDER/TX\_ORIGIN is the first in-list signer, resolved LAZILY by the
engine (NoSigner only when the program actually reads the sender) - so no
signer is auto-appended; a MSG\_SENDER-reading program whose manifest
declares no signer slot passes `appendPayerSigner: true`.

```typescript theme={null}
export declare function resolveAccounts(manifest: AccountManifest, resolution: AccountResolution, payer: Address, { appendPayerSigner }?: ResolveAccountsOptions): ResolvedAccountMeta[];
```

### `AccountResolution`

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

Maps each declared slot of the compiler's AccountManifest to a concrete
address. `signer` REPLACES the manifest's requirement rather than only
raising it: omit it to keep the manifest's own value, `true` to make a
non-signer slot sign, and `false` to attach a slot the program treats as a
signer WITHOUT a transaction signature - which is what a PDA the program
signs for via `invoke_signed` needs. Pass the TransactionSigner itself to
also sign with it (required for any signer ref other than the reserved
fee-payer ref - the send layer has no other way to obtain that signature).

The two sides describe different things: the manifest states what the PROGRAM
requires of the slot, this states what the TRANSACTION provides.

```typescript theme={null}
export interface AccountResolution {
    [ref: string]: Address | {
        address: Address;
        signer?: boolean | TransactionSigner;
    };
}
```

### `PAYER_REF`

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

Reserved ref: resolves to the fee payer with signer:true (use it when
bytecode reads MSG\_SENDER). A resolution entry under this key is a conflict
and throws - rename the plan ref if it must resolve to another address.

```typescript theme={null}
PAYER_REF = "payer"
```

### `ResolveAccountsOptions`

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

```typescript theme={null}
export interface ResolveAccountsOptions {
    appendPayerSigner?: boolean;
}
```

### `ResolvedAccountMeta`

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

```typescript theme={null}
export interface ResolvedAccountMeta {
    address: Address;
    role: AccountRole;
    signer?: TransactionSigner;
}
```


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