> ## 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: Token extensions

> Token extensions: 17 exports of the svm module of @eco-incorp/sauce, including parseMintExtensions, getEpochFee, calcTransferFee, netTransferAmount, ONE_IN_BASIS_POINTS, EXT_UNINITIALIZED.

`@eco-incorp/sauce/svm` is the Solana side: staging a program through the kitchen, resolving accounts against the compiler's account manifest, building and sending transactions, and verifying settle programs. Solana execution goes through the Kitchen client here; the SDK's SVM route helpers emit a legacy instruction that the released engine does not accept.

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

This page covers `sdk/dist/svm/token-extensions.d.ts`.

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

### `parseMintExtensions`

*Function* · `sdk/dist/svm/token-extensions.d.ts`

Parse the Token-2022 TLV extension region of a mint. Returns
`{ blocking: [] }` for a legacy 82-byte mint (or any non-T22 shape). For a
Token-2022 mint, recognizes TransferFeeConfig and TransferHook (returned as
structured fields) plus the un-routable set (NonTransferable,
PermanentDelegate, ConfidentialTransferMint, MemoTransfer-required, and
DefaultAccountState frozen), each pushed as a reason string into `blocking`.

```typescript theme={null}
export declare function parseMintExtensions(mintData: Uint8Array): MintExtensions;
```

### `getEpochFee`

*Function* · `sdk/dist/svm/token-extensions.d.ts`

The TransferFee active at `epoch`: newer if epoch >= newer.epoch, else older.

```typescript theme={null}
export declare function getEpochFee(cfg: TransferFeeConfig, epoch: bigint): TransferFee;
```

### `calcTransferFee`

*Function* · `sdk/dist/svm/token-extensions.d.ts`

The transfer fee withheld from `amount` under `cfg` at `epoch`, EXACTLY as
spl-token-2022 computes it: 0 when bps or amount is 0, else
min(maximum\_fee, ceil(amount \* bps / 10\_000)).

```typescript theme={null}
export declare function calcTransferFee(amount: bigint, cfg: TransferFeeConfig, epoch: bigint): bigint;
```

### `netTransferAmount`

*Function* · `sdk/dist/svm/token-extensions.d.ts`

The amount the recipient actually receives: `amount - calcTransferFee(...)`.

```typescript theme={null}
export declare function netTransferAmount(amount: bigint, cfg: TransferFeeConfig, epoch: bigint): bigint;
```

### `ONE_IN_BASIS_POINTS`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

Basis-points denominator (spl-token-2022 ONE\_IN\_BASIS\_POINTS).

```typescript theme={null}
ONE_IN_BASIS_POINTS = 10000n
```

### `EXT_UNINITIALIZED`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

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

### `EXT_TRANSFER_FEE_CONFIG`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

```typescript theme={null}
EXT_TRANSFER_FEE_CONFIG = 1
```

### `EXT_CONFIDENTIAL_TRANSFER_MINT`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

```typescript theme={null}
EXT_CONFIDENTIAL_TRANSFER_MINT = 4
```

### `EXT_DEFAULT_ACCOUNT_STATE`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

```typescript theme={null}
EXT_DEFAULT_ACCOUNT_STATE = 6
```

### `EXT_MEMO_TRANSFER`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

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

### `EXT_NON_TRANSFERABLE`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

```typescript theme={null}
EXT_NON_TRANSFERABLE = 9
```

### `EXT_PERMANENT_DELEGATE`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

```typescript theme={null}
EXT_PERMANENT_DELEGATE = 12
```

### `EXT_TRANSFER_HOOK`

*Variable* · `sdk/dist/svm/token-extensions.d.ts`

```typescript theme={null}
EXT_TRANSFER_HOOK = 14
```

### `TransferFee`

*Interface* · `sdk/dist/svm/token-extensions.d.ts`

One transfer-fee schedule, valid from `epoch` onward until superseded.

```typescript theme={null}
export interface TransferFee {
    epoch: bigint;
    maximumFee: bigint;
    transferFeeBasisPoints: number;
}
```

### `TransferFeeConfig`

*Interface* · `sdk/dist/svm/token-extensions.d.ts`

A mint's TransferFeeConfig: the older and newer fee schedules. A caller picks
the one effective at the current epoch (see `getEpochFee`) - the config
carries both so a quote computed near an epoch boundary stays exact.

```typescript theme={null}
export interface TransferFeeConfig {
    olderTransferFee: TransferFee;
    newerTransferFee: TransferFee;
}
```

### `TransferHookInfo`

*Interface* · `sdk/dist/svm/token-extensions.d.ts`

A mint's TransferHook extension (non-nil program only).

```typescript theme={null}
export interface TransferHookInfo {
    programId: Address;
    extraAccountMetaListPda?: Address;
}
```

### `MintExtensions`

*Interface* · `sdk/dist/svm/token-extensions.d.ts`

Parsed mint extensions relevant to routing.

```typescript theme={null}
export interface MintExtensions {
    transferFee?: TransferFeeConfig;
    transferHook?: TransferHookInfo;
    blocking: string[];
    advisories: string[];
}
```
