import BigNumber from '../../config/bigNumber'; import { CurveType, DefaultCurrencies, TradeDirection } from '../constants'; export type CurveDefaults = { tokenDecimals: number; type: CurveType; totalSupply: bigint; minAllocationTokenAmount: bigint; maxAllocationTokenAmount: bigint; address: string; }; export type CurveDefaultConfig = CurveDefaults & { feeBps: number; marketCapThreshold: bigint; coefB: bigint; }; export declare enum ContractCurrency { SOL = 0 } export declare enum ContractCurveType { LINEAR_V1 = 0, CONSTANT_PRODUCT_V1 = 1, CONSTANT_PRODUCT_V2 = 2, FLAT_V1 = 3, FLAT_V1_ANTI_SNIPE = 4 } export declare const toContractCurrency: (currency: DefaultCurrencies) => ContractCurrency; export declare const toContractCurveType: (curveType: CurveType) => ContractCurveType; export interface CalculatePriceOptions { coefA: BigNumber; coefB: BigNumber; nAmount: bigint; curvePosition: bigint; decimalsNr: number; collateralDecimalsNr: number; } export interface CalculateTokensOptions { coefA: BigNumber; coefB: BigNumber; collateralAmount: bigint; curvePosition: bigint; decimalsNr: number; collateralDecimalsNr: number; tradeDirection?: TradeDirection; } export interface GetCollateralPriceOptions { collateralDecimalsNr: number; tokenDecimalsNr: number; marketCapDecimalsNr: number; totalSupply: bigint; marketCapThreshold: bigint; tokensAmount: bigint; curvePosition: bigint; coefB: bigint; } export interface GetTokensNrFromCollateralOptions { collateralAmount: bigint; collateralDecimalsNr: number; tokenDecimalsNr: number; marketCapDecimalsNr: number; totalSupply: bigint; marketCapThreshold: bigint; curvePosition: bigint; coefB: bigint; direction?: TradeDirection; } export interface GetPriceForCurvePositionOptions { collateralDecimalsNr: number; tokenDecimalsNr: number; marketCapDecimalsNr: number; totalSupply: bigint; marketCapThreshold: bigint; curvePosition: bigint; coefB: bigint; } export interface CalculationOptions { amount: bigint; curvePosition: bigint; platformFeeBps: number; tradeDirection: 'BUY' | 'SELL'; } export interface GetPriceOptions { curvePosition: bigint; collateralDecimals?: number; } export interface GetMarketCapOptions { curvePosition: bigint; tokenDecimals?: number; collateralDecimals?: number; }