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

> Account names: the declaration and description of each of the 11 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`.

### `svmPublicKey`

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

A Solana public key in either spelling the SDK writes one in: base58, or its 32 bytes as `0x`
and 64 hex digits - how a program holds a key (an `Address` value), and how `sauce globals`
prints a mint's `address` and deployments.json a program's `key`. The key in base58, which every
Solana client takes; `undefined` for any other text.

```typescript theme={null}
export declare function svmPublicKey(text: string): Address | undefined;
```

### `isSvmAccountName`

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

Whether `value` is a name this language has (it says nothing of whether it resolves).

```typescript theme={null}
export declare function isSvmAccountName(value: string): boolean;
```

### `svmNamesPot`

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

Whether `value` names the Pot: `pot`, a `pot:<token>` account, or an address derived from `pot`.
A program's derivations name it where the program uses `pot`, and cooked directly on the engine
(`via: "engine"`) there is no Pot.

```typescript theme={null}
export declare function svmNamesPot(value: string): boolean;
```

### `svmCookRoles`

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

The cook roles the account `value` derives from: the role itself (`pot`, `owner`, `authority`),
its token account (`pot:USDC`, `authority:USDC`, `owner:USDC`), or an address it seeds. A slot so
derived must be the account its derivation gives, cooked either way: a program reads it as the
Pot, its owner or the authority it acts with. Empty for every other name.

```typescript theme={null}
export declare function svmCookRoles(value: string): ReadonlySet<SvmCookRole>;
```

### `resolveSvmAccountName`

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

Resolves one name to the account a cook attaches. `pot` and `owner` stay as they are (and
`authority` becomes one of them), so the cook gives each its signing role; every other name
becomes an address. Throws `SvmAccountNameError` for a name the language does not have (the
name `self` is refused; the Pot is `pot`), a symbol the chain does not register, any `pot` form cooked
with no Pot (`via: "engine"`), or an argument not given.

```typescript theme={null}
export declare function resolveSvmAccountName(value: string, ctx: SvmAccountNameContext): Promise<ResolvedSvmAccountName>;
```

### `SvmMintProgramOf`

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

A mint's token program, read from the cluster: the owner of the mint's account.

```typescript theme={null}
export type SvmMintProgramOf = (mint: Address) => Promise<Address>;
```

### `SvmAccountNameContext`

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

What `resolveSvmAccountName` resolves names against: the cook, and main's arguments.

```typescript theme={null}
export interface SvmAccountNameContext {
    readonly chain: CanonicalChain;
    readonly owner: Address;
    readonly pot: Address;
    readonly via?: "kitchen" | "engine";
    readonly args?: Readonly<Record<string, Address>>;
    readonly integers?: Readonly<Record<string, bigint>>;
    readonly programOf?: SvmMintProgramOf;
    readonly load?: OwnedAccountLoader;
    readonly slots?: Map<string, Promise<SvmSlot>>;
    readonly found?: Map<string, Address | null>;
    readonly keyedPools?: Map<string, Promise<Address>>;
}
```

### `ResolvedSvmAccountName`

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

One name, resolved.

```typescript theme={null}
export interface ResolvedSvmAccountName {
    readonly value: "pot" | "owner" | Address;
    readonly label?: string;
    readonly kind: "pot" | "owner" | "address" | "account" | "mint" | "program";
    readonly account?: {
        readonly mint: Address;
        readonly holder: Address;
        readonly program: Address;
    };
}
```

### `SvmAccountNameError`

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

A name that cannot be resolved; its message reads after the name.

```typescript theme={null}
export declare class SvmAccountNameError extends Error {
    readonly name = "SvmAccountNameError";
}
```

### `SYSTEM_HOLDER`

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

Why `system:<token>` names nothing: `system` is no holder.

```typescript theme={null}
SYSTEM_HOLDER: (value: string) => string
```

### `SvmCookRole`

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

A role of the cook itself, which every cook fills: the Pot, its owner, the engine call's signer.

```typescript theme={null}
export type SvmCookRole = "pot" | "owner" | "authority";
```


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