import type { Policy } from './types.js'; /** Which per-portal running total a signed amount counts against. */ export type SpendAsset = 'wei' | 'lamports'; export interface WindowCap { /** TOML field name, for the deny reason. */ label: string; windowMs: number; cap: bigint; } export declare const HOUR_MS: number; export declare const DAY_MS: number; /** The rolling-window caps a policy sets for one asset, longest window last. */ export declare function windowCapsFor(policy: Policy, asset: SpendAsset): WindowCap[]; /** * Pure check: would signing `amount` now push any window over its cap? * `spent(windowMs)` returns what the ledger already holds for that trailing * window. Returns a human-readable deny reason, or null if every cap holds. * A zero amount never breaches (a cap of 0 means "no value at all", and * value-less calls carry no value). */ export declare function checkWindowCaps(caps: readonly WindowCap[], amount: bigint, spent: (windowMs: number) => bigint, unit: SpendAsset): string | null; //# sourceMappingURL=window.d.ts.map