import { Balance, CoinType, CoinsToBalance, PoolObject } from "../../../types";
import { LocalNumber, OnChainScalar } from "../../../general/utils/fixedUtils";
export declare class CmmmCalculations {
    private static minWeight;
    private static maxWeightedTokens;
    private static maxInRatio;
    private static maxOutRatio;
    private static minInvariantRatio;
    private static maxInvariantRatio;
    private static maxNewtonAttempts;
    private static convergenceBound;
    private static tolerance;
    private static validityTolerance;
    static calcInvariant: (pool: PoolObject) => number;
    static calcInvariantQuadratic: (prod: number, sum: number, flatness: number) => number;
    static calcInvariantComponents: (pool: PoolObject, index: CoinType) => [prod: number, sum: number, p0: number, s0: number, h: number];
    static calcSpotPrice: (pool: PoolObject, coinTypeIn: CoinType, coinTypeOut: CoinType) => number;
    static calcSpotPriceWithFees: (pool: PoolObject, coinTypeIn: CoinType, coinTypeOut: CoinType, ignoreFees?: boolean) => number;
    private static calcSpotPriceBody;
    static calcOutGivenIn: (pool: PoolObject, coinTypeIn: CoinType, coinTypeOut: CoinType, amountIn: Balance) => Balance;
    static calcInGivenOut: (pool: PoolObject, coinTypeIn: CoinType, coinTypeOut: CoinType, amountOut: Balance) => Balance;
    static calcSwapFixedIn: (pool: PoolObject, amountsIn: CoinsToBalance, amountsOutDirection: CoinsToBalance) => OnChainScalar;
    static calcSwapFixedOut: (pool: PoolObject, amountsInDirection: CoinsToBalance, amountsOut: CoinsToBalance) => OnChainScalar;
    static calcDepositFixedAmounts: (pool: PoolObject, amountsIn: CoinsToBalance) => OnChainScalar;
    private static calcDepositFixedAmountsInitialEstimate;
    static calcWithdrawFlpAmountsOut: (pool: PoolObject, amountsOutDirection: CoinsToBalance, lpRatio: LocalNumber) => CoinsToBalance;
    private static calcWithdrawFlpAmountsOutInitialEstimate;
    static calcAllCoinDeposit: (pool: PoolObject, amountsIn: CoinsToBalance) => CoinsToBalance;
    static calcAllCoinWithdraw: (pool: PoolObject, amountsOut: CoinsToBalance) => CoinsToBalance;
    private static getTokenBalanceGivenInvariantAndAllOtherBalances;
    static checkValidSwap: (pool: PoolObject, amountsIn: CoinsToBalance, amountsInScalar: LocalNumber, amountsOut: CoinsToBalance, amountsOutScalar: LocalNumber) => boolean;
    static checkValid1dSwap: (pool: PoolObject, coinTypeIn: CoinType, coinTypeOut: CoinType, amountInB: Balance, amountOutB: Balance) => boolean;
    static checkValidDeposit: (pool: PoolObject, amountsIn: CoinsToBalance, lpRatioRaw: OnChainScalar) => boolean;
    static checkValidWithdraw: (pool: PoolObject, amountsOutSrc: CoinsToBalance, lpRatio: LocalNumber) => boolean;
    static getEstimateOutGivenIn: (pool: PoolObject, coinTypeIn: CoinType, coinTypeOut: CoinType, amountIn: Balance) => Balance;
    static getEstimateInGivenOut: (pool: PoolObject, coinTypeIn: CoinType, coinTypeOut: CoinType, amountOut: Balance) => Balance;
    static getEstimateSwapFixedIn: (pool: PoolObject, amountsIn: CoinsToBalance, amountsOutDirection: CoinsToBalance) => LocalNumber;
    static getEstimateSwapFixedOut: (pool: PoolObject, amountsInDirection: CoinsToBalance, amountsOut: CoinsToBalance) => LocalNumber;
    static getEstimateDepositFixedAmounts: (pool: PoolObject, amountsIn: CoinsToBalance) => LocalNumber;
    static getEstimateWithdrawFlpAmountsOut: (pool: PoolObject, amountsOutDirection: CoinsToBalance, lpRatio: LocalNumber) => LocalNumber;
}
//# sourceMappingURL=cmmmCalculations.d.ts.map