> ## 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: huma

> The huma Solana venue: the declaration and description of each of the 13 exports of @eco-incorp/sauce/svm.

Solana venue integration `huma`, exported from `@eco-incorp/sauce/svm`.

Generated from the type declarations of `@eco-incorp/sauce`.

### `humaLenderStatePda`

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

PDA(\["lender\_state", modeConfig, lender], HUMA\_PROGRAM\_ID) - a per-(mode,owner) precondition account; see the module doc.

```typescript theme={null}
export declare function humaLenderStatePda(modeConfig: Address, lender: Address): Promise<Address>;
```

### `humaFeeBpsFor`

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

The tier fee (bps) applying at a given liquid-asset-ratio (bps): the first (smallest threshold) tier the ratio is strictly below; 0 if none match.

```typescript theme={null}
export declare function humaFeeBpsFor(liquidRatioBps: bigint, feeTiers: readonly HumaFeeTier[]): bigint;
```

### `humaFeeAssignLines`

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

Builds the tiered instant-withdrawal fee lookup as a flat `let` + sequence
of top-level `if` reassignments - NO ternaries (the compiler rejects a
nested/chained ConditionalExpression; see this file's emitQuote doc).
Tiers are ascending by ltBps; checked in DESCENDING order so the LAST if to
fire (the smallest matching threshold - the correct, most-conservative
tier) is the one left standing, reproducing "first ascending match wins"
exactly.

```typescript theme={null}
export declare function humaFeeAssignLines(c: HumaPoolConfig, ratioVar: string, feeVar: string): string[];
```

### `HUMA_PROGRAM_ID`

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

```typescript theme={null}
HUMA_PROGRAM_ID: Address<"HumaXepHnjaRCpjYTokxY4UtaJcmx41prQ8cxGmFC5fn">
```

### `HUMA_CURATED_MODE_CONFIGS`

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

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

### `HumaFeeTier`

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

```typescript theme={null}
export interface HumaFeeTier {
    ltBps: bigint;
    feeBps: bigint;
}
```

### `HumaPoolConfig`

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

```typescript theme={null}
export interface HumaPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "deposit" | "withdraw";
    modeConfig: Address;
    poolConfigAccount: Address;
    poolState: Address;
    modeMint: Address;
    poolAuthority: Address;
    poolUnderlyingToken: Address;
    underlyingMint: Address;
    humaConfig: Address;
    poolOwnerTreasuryUnderlyingToken: Address;
    modeAssetsOffset: number;
    liquidAssetsDeployedOffset: number;
    disbursementReserveOffset: number;
    liquidityCap: bigint;
    minDepositAmount: bigint;
    reserveLimit: bigint;
    feeTiers: readonly HumaFeeTier[];
    liquidityDeploymentConfig: Address | null;
    liquidityDeploymentState: Address | null;
}
```

### `huma`

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

```typescript theme={null}
huma: SvmVenueAdapter
```

### `humaDepositAccounts`

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

```typescript theme={null}
declare function humaDepositAccounts(c: HumaPoolConfig, user: SwapUser): VenueAccount[];
```

### `humaInstantWithdrawAccounts`

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

```typescript theme={null}
declare function humaInstantWithdrawAccounts(c: HumaPoolConfig, user: SwapUser): VenueAccount[];
```

### `humaEncodeDepositData`

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

```typescript theme={null}
declare function humaEncodeDepositData(assets: bigint): Uint8Array;
```

### `humaEncodeInstantWithdrawData`

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

```typescript theme={null}
declare function humaEncodeInstantWithdrawData(shares: bigint): Uint8Array;
```

### `HUMA_MODE_STATE_SIZE`

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

```typescript theme={null}
HUMA_MODE_STATE_SIZE = 216
```


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