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

> 10 exports of the humidifi venue integration in @eco-incorp/sauce/svm, including HUMIDIFI_PROGRAM_ID, HUMIDIFI_XOR_KEY, HUMIDIFI_AMOUNT_XOR_MASK, HUMIDIFI_POOL_REGISTRY, HUMIDIFI_SAFETY_FEE_PPM, humidifiKeystream.

Solana venue integration `humidifi` under `svm/venues/humidifi`.

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

### `HUMIDIFI_PROGRAM_ID`

*Variable* · `sdk/dist/svm/venues/humidifi/index.d.ts`

The swap-settlement program (NOT the `AubCGUt9...` route/setup program).

```typescript theme={null}
HUMIDIFI_PROGRAM_ID: Address<"9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp">
```

### `HUMIDIFI_XOR_KEY`

*Variable* · `sdk/dist/svm/venues/humidifi/index.d.ts`

The 8-byte XOR key, per the public "HumidiFi Swap Parser" gist (see file header, item 2).

```typescript theme={null}
HUMIDIFI_XOR_KEY: readonly number[]
```

### `HUMIDIFI_AMOUNT_XOR_MASK`

*Variable* · `sdk/dist/svm/venues/humidifi/index.d.ts`

chunk 1 (bytes 8-15, amountIn) keystream, as a little-endian u64 - XORing a runtime LE value
with this constant is byte-for-byte equivalent to XORing the two 8-byte arrays (see file header
item 2 and `buildSwapV2` below), so this is exactly what `patchXorMaskIn` needs to be.

```typescript theme={null}
HUMIDIFI_AMOUNT_XOR_MASK: bigint
```

### `HUMIDIFI_POOL_REGISTRY`

*Variable* · `sdk/dist/svm/venues/humidifi/index.d.ts`

Hand-verified HumidiFi pools: for each, a real mainnet swap transaction was
decoded (obfuscation removed, account order matched) and the vault/mint
addresses were cross-checked against `preTokenBalances`/`postTokenBalances`
on that transaction. Ranked by observed activity in the sampled window;
extend by repeating the same verification (see docs/humidifi-evidence.md).

```typescript theme={null}
HUMIDIFI_POOL_REGISTRY: Record<string, HumidiFiRegistryEntry>
```

### `HUMIDIFI_SAFETY_FEE_PPM`

*Variable* · `sdk/dist/svm/venues/humidifi/index.d.ts`

Safety haircut on the INPUT before a plain constant-product curve - NOT a
claim about HumidiFi's real fee (unknown, see file header item 6). Only
300,000 (of 1,000,000) = 30% of the input counts (a 70% haircut). Chosen
so the model stays below every one of 22 real sampled trades' realized
output ACROSS TWO DIFFERENT POOLS (worst-case margin 28.8%, on the
memecoin/USDC pool) - a 50% haircut passes the 21-trade SOL/USDC sample
but over-promises the second pool by 18.6%, so this constant is
calibrated against the worst pool sampled, not the best-sampled one.

```typescript theme={null}
HUMIDIFI_SAFETY_FEE_PPM = 300000n
```

### `humidifiKeystream`

*Function* · `sdk/dist/svm/venues/humidifi/index.d.ts`

The 8-byte keystream for 8-byte chunk `pos` (0-based): `HUMIDIFI_XOR_KEY[j] ^ ((pos·0x0001_0001_0001_0001) bytes)[j]`.

```typescript theme={null}
export declare function humidifiKeystream(pos: number): Uint8Array;
```

### `humidifiDeobfuscate`

*Function* · `sdk/dist/svm/venues/humidifi/index.d.ts`

Deobfuscate a captured 25-byte HumidiFi swap instruction (test/verification use).

```typescript theme={null}
export declare function humidifiDeobfuscate(data: Uint8Array): Uint8Array;
```

### `fetchHumidifiConfig`

*Function* · `sdk/dist/svm/venues/humidifi/index.d.ts`

Registry lookup + liveness check ONLY - this family's pool account carries
no plaintext structure we can decode (file header item 5), so there is
nothing further to read off it. `load(pool)` still runs once so a pool
whose account has since closed/reallocated (a stale registry entry) is
dropped like any other vanished pool, never silently misquoted.

```typescript theme={null}
export declare function fetchHumidifiConfig(load: AccountLoader, pool: Address): Promise<HumidiFiPoolConfig>;
```

### `HumidiFiRegistryEntry`

*Interface* · `sdk/dist/svm/venues/humidifi/index.d.ts`

```typescript theme={null}
export interface HumidiFiRegistryEntry {
    baseVault: Address;
    quoteVault: Address;
    baseMint: Address;
    quoteMint: Address;
    baseDecimals: number;
    quoteDecimals: number;
}
```

### `HumidiFiPoolConfig`

*Interface* · `sdk/dist/svm/venues/humidifi/index.d.ts`

```typescript theme={null}
export interface HumidiFiPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "baseToQuote" | "quoteToBase";
    baseVault: Address;
    quoteVault: Address;
    baseMint: Address;
    quoteMint: Address;
    baseDecimals: number;
    quoteDecimals: number;
}
```
