import BN from "bn.js"; import { OutcomeResult } from "./types.js"; /** * Calculate the expected outcome based on current price and strikes * * For High Pool: * - Outcome 0: price < strikes[0] * - Outcome 1: price >= strikes[0] AND price < strikes[1] * - Outcome 2: price >= strikes[1] AND price < strikes[2] * - Outcome 3: price >= strikes[2] * * For Low Pool: * - Strikes are in DESCENDING order: [strike0=$160, strike1=$150, strike2=$140] * - Outcome 0: price >= strikes[0] (price >= $160, no strikes hit) * - Outcome 1: price < strikes[0] AND price >= strikes[1] (below $160, above $150) * - Outcome 2: price < strikes[1] AND price >= strikes[2] (below $150, above $140) * - Outcome 3: price < strikes[2] (below $140, all strikes hit) * * CRITICAL: Low Pool strikes must be checked from lowest to highest (s2 → s1 → s0) * using independent if statements to allow cumulative outcome assignment. * * @param priceInCents - Current price in cents * @param strikes - Strike prices in cents [strike0, strike1, strike2] * @returns Outcome for both High and Low pools * * @example * ```typescript * // High Pool strikes: [140, 150, 160] (ascending) * const result = calculateOutcome(15500, [14000, 15000, 16000]); * // result.highOutcome = 2 (price >= 150 but < 160) * * // Low Pool strikes: [160, 150, 140] (descending) * const result = calculateOutcome(15500, [16000, 15000, 14000]); * // result.lowOutcome = 1 (price < 160 but >= 150) * ``` */ export declare function calculateOutcome(priceInCents: number, strikes: [BN, BN, BN] | [number, number, number]): OutcomeResult; /** * Check if a new outcome should be marked * * @param currentOutcome - Current winning_outcome from pool * @param newOutcome - Calculated outcome from price * @returns true if newOutcome > currentOutcome (should call mark_extreme) */ export declare function shouldMarkExtreme(currentOutcome: number, newOutcome: number): boolean; //# sourceMappingURL=calculate.d.ts.map