import { BigNumber } from "ethers";
import { FlowTupleParameters } from "./UBAFeeTypes";
/**
 * Computes a linear integral over a piecewise function
 * @param cutoffArray An array of tuples that define the cutoff points and values of the piecewise function
 * @param index The index of the cutoffArray that we're currently in
 * @param integralStart Where we're starting the integral
 * @param integralEnd Where we're ending the integral
 * @returns The integral of the piecewise function over the given range
 */
export declare function performLinearIntegration(cutoffArray: [BigNumber, BigNumber][], index: number, integralStart: BigNumber, integralEnd: BigNumber): BigNumber;
/**
 * Retrieve the numerical bounds of a given interval from an array of buckets
 * @param cutoffArray An array of tuples that define the cutoff points and values of the piecewise function
 * @param index The index of the cutoffArray that we're currently in
 * @returns The upper and lower bounds of the interval
 */
export declare function getBounds(cutoffArray: [BigNumber, BigNumber][], index: number): [BigNumber, BigNumber];
/**
 * Get the interval that the target is within and the bounds of that interval
 * @param cutoffArray An array of tuples that define the cutoff points and values of the piecewise function
 * @param target The target value that we're trying to find the interval for
 * @returns The index of the interval that the target is in and the bounds of that interval
 */
export declare function getInterval(cutoffArray: [BigNumber, BigNumber][], target: BigNumber): [number, [BigNumber, BigNumber]];
/**
 * Computes the balancing fee for a refund request
 * @param cutoffArray An array of tuples that define the cutoff points and values of the piecewise function
 * @param runningBalance The current running balance of the spoke pool
 * @param modificationAmount The amount that the user will be refunding
 * @returns The balancing fee for the refund
 */
export declare function getRefundBalancingFee(cutoffArray: [BigNumber, BigNumber][], runningBalance: BigNumber, modificationAmount: BigNumber): BigNumber;
/**
 * Computes the balancing fee for a deposit.
 * @param cutoffArray An array of tuples that define the cutoff points and values of the piecewise function
 * @param runningBalance The current running balance of the spoke pool
 * @param modificationAmount The amount that the user will be depositing
 * @returns The balancing fee for the deposit
 */
export declare function getDepositBalancingFee(cutoffArray: [BigNumber, BigNumber][], runningBalance: BigNumber, modificationAmount: BigNumber): BigNumber;
/**
 * Computes a general integral of a linear piecewise function. It is mindful of the sign of the direction
 * of integration.
 * @param functionBounds An array of tuples that define the cutoff points and values of the piecewise function
 * @param x The lower bound of the integral
 * @param y The upper bound of the integral
 * @returns The integral of the piecewise function over the given range
 */
export declare function computePiecewiseLinearFunction(functionBounds: [BigNumber, BigNumber][], x: BigNumber, y: BigNumber): BigNumber;
/**
 * A mapping of the balancing fee functions to the inflow/outflow types. This is used to
 * as a convenience to avoid having to do multiple if/else statements in the UBAFeeCalculator
 */
export declare const balancingFeeFunctionLookupMapping: {
    inflow: typeof getDepositBalancingFee;
    outflow: typeof getRefundBalancingFee;
};
/**
 * Asserts that the fee curve is valid per the UBA specification.
 * @param feeCurve The fee curve whose validity we are asserting
 * @param validateZeroPoint Whether or not to validate that there is a zero point in the fee curve
 * @throws An error if the fee curve is invalid
 * @note This function is only testing for structural validity. It does not test for
 *       the validity of the parameters of the fee curve.
 */
export declare function assertValidityOfFeeCurve(feeCurve: FlowTupleParameters, validateZeroPoint: boolean): void;
