import BigNumber from 'bignumber.js';
import { HyperbolaPayoutCurve } from './HyperbolaPayoutCurve';
import { PolynomialPayoutCurve } from './PolynomialPayoutCurve';
export declare function zipWithIndex<T>(arr: T[]): [T, number][];
export declare function dropUntil<T>(data: T[], check: (_: T) => boolean): T[];
export declare function decompose(num: bigint, base: number, numDigits: number): number[];
export declare function separatePrefix(start: bigint, end: bigint, base: number, numDigits: number): {
    prefixDigits: number[];
    startDigits: number[];
    endDigits: number[];
};
export declare function frontGroupings(digits: number[], base: number): number[][];
export declare function backGroupings(digits: number[], base: number): number[][];
export declare function middleGroupings(firstDigitStart: number, firstDigitEnd: number): number[][];
export declare function groupByIgnoringDigits(start: bigint, end: bigint, base: number, numDigits: number): number[][];
export interface RoundingInterval {
    beginInterval: bigint;
    roundingMod: bigint;
}
export type CETPayout = {
    indexFrom: bigint;
    indexTo: bigint;
    payout: bigint;
};
/**
 * Performs optimized evaluation and rounding for strictly monotonic hyperbolas on intervals (from, to)
 * e.g. hyperbolas with the form b = c = 0
 *
 * The next start of a payout range is determined by finding the outcome at the next mid-rounding payout.
 * Uses an inverse function of the hyperbola to find the outcome.
 *
 * Optimizes rounding from O(to - from) to O(totalCollateral / rounding)
 *
 *
 * Evaluates and rounds a payout_function equivalent to:
 *
 *   payout_function_v0
 *    num_pieces: 1
 *    endpoint_0: from
 *    endpoint_payout_0: fromPayout
 *    extra_precision_0: 0
 *    payout_curve_piece: HyperbolaPayoutCurve
 *    endpoint_1: to
 *    endpoint_payout_1: toPayout
 */
export declare function splitIntoRanges(from: bigint, to: bigint, fromPayout: bigint, // endpoint_payout
toPayout: bigint, // endpoint_payout
totalCollateral: bigint, curve: HyperbolaPayoutCurve | PolynomialPayoutCurve, roundingIntervals: RoundingInterval[]): CETPayout[];
export declare const mergePayouts: (payouts: CETPayout[]) => CETPayout[];
export declare function roundPayout(payout: BigNumber, rounding: bigint): bigint;
