/** Running whole-account totals folded across a clearinghouse's per-dex views. */ export interface DexSummaryTotals { accountValue: number; withdrawable: number; totalMarginUsed: number; totalUnrealizedPnl: number; totalNtlPos: number; } export declare function emptyDexSummaryTotals(): DexSummaryTotals; /** * Folds one dex section's account scalars into the running totals. * * A Hyperliquid strategy wallet is a single unified cross-margin account that * the API mirrors as one view per perp DEX (`{ main, xyz, … }`), all sharing * ONE USDC collateral pool. The per-field aggregation rule follows from that: * * - `accountValue` / `withdrawable` describe the WHOLE account. The dex holding * a position reports full equity; every other view reports only free * collateral; and `withdrawable` is identical in every view. So take the * `max()`, NEVER the sum — summing double-counts the shared pool and sizes * `margin_pct` positions ~2× too large. * - `totalMarginUsed` / `totalUnrealizedPnl` / `totalNtlPos` are genuine * per-dex usage of the shared pool → sum. * * Single-collateral-token assumption: this is correct while every dex shares * one collateral (today all USDC). A dex on a different collateral (e.g. USDT * CASH perps) would need grouping by collateral token — neither max nor sum is * exact across collaterals. Equity/withdrawable are non-negative, so the `0` * seed is a safe `max()` identity. */ export declare function foldDexSummary(totals: DexSummaryTotals, summary: Record | undefined, withdrawable: unknown): void; //# sourceMappingURL=clearing-house-aggregate.d.ts.map