import { type DeployPackage } from "./package.js"; /** * The platform per-wallet floor — mirrors the backend's `MINIMUM_STRATEGY_BUDGET` default * (`getMinimumStrategyBudget` in senpi-hyperliquid-mcp). `funding.ts` re-exports it as `MIN_WALLET` * so the runtime, like the skills side, has ONE copy of the physics. */ export declare const WALLET_FLOOR = 10; /** The notional the engine bumps a small order up to. */ export declare const BUMPED_NOTIONAL = 12; /** USDC reserved per wallet for the creation fee (observed ~$1). */ export declare const FEE_BUFFER = 1.5; /** One instance's contribution, in the Python's `breakdown` shape (camelCased). */ export interface MinBudgetRow { wallet: string; /** null = nothing in this sleeve resolved to a slot size. */ marginPct: number | null; minLeverage: number; fundingShare: number; perWalletMin: number; } export interface MinBudgetResult { /** The number to warn against. Never rounded down; a `catalog.min_budget_floor` may raise it. */ minBudget: number; walletCount: number; /** The sleeve whose per-wallet minimum over its share drives the total. null for an empty package. */ bindingWallet: string | null; /** * Sleeves whose marginPct could NOT be resolved — their per-wallet minimum fell back to the bare * floor, so `minBudget` may be UNDERSTATED. Never silently swallowed: deploy warns rather than * assert a number it never computed. */ unresolvedWallets: string[]; /** The pre-rounding total, for the report's arithmetic to be checkable. */ raw: number; breakdown: MinBudgetRow[]; } /** The `strategy.yaml` subset this reads: instances with their shares, plus the catalog block. */ export interface MinBudgetManifest { instances?: Array<{ name?: unknown; funding_share?: unknown; }> | null; catalog?: Record | null; } /** instance name → its parsed `runtime.yaml` document. */ export type MinBudgetRuntimes = Record | null | undefined>; /** * PURE. `manifest` is the parsed `strategy.yaml`; `runtimes` maps instance name → parsed * `runtime.yaml`. Mirrors the Python's full return shape (camelCased). */ export declare function strategyMinBudget(manifest: MinBudgetManifest, runtimes: MinBudgetRuntimes): MinBudgetResult; /** * The same calculation over a loaded package — the port of `deploy.py`'s `strategy_min(pkg)`. The * package's own YAML is the only input, because a custom-authored package never passes through * catalog generation: "what the card promised" and "what deploy warns about" are one function. * * A runtime.yaml that cannot be parsed contributes an EMPTY document rather than throwing: this is * an advisory warning computed after the money gates have already passed, and it must never be the * thing that fails a deploy. Such a sleeve lands in `unresolvedWallets`, which is exactly the * "may be understated" warning. * * **An absent `funding_share` resolves to `1/n`, not to the Python's `1.0`** — see the header's * documented-deviation list. The adapter is the right place for it: `strategyMinBudget` keeps * byte-parity with the reference, and this layer is where the manifest meets the verb that will * actually spend the money. */ export declare function packageMinBudget(pkg: DeployPackage): MinBudgetResult; //# sourceMappingURL=min-budget.d.ts.map