import { Contract, ethers, TransactionLike } from 'ethers'; import { Contract as MulticallContract } from "@curvefi/ethcall"; import BigNumber from 'bignumber.js'; import { Abi, AbiFunction, IBasePoolShortItem, IChainId, ICurveLiteNetwork, IDict, IGasStrategy, IMethodInfo, INetworkName, IRewardFromApi, IVolumeAndAPYs, REFERENCE_ASSET } from './interfaces'; import { Curve } from "./curve.js"; export declare const ETH_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; export declare const MAX_ALLOWANCE: bigint; export declare const abiInfoBuild: (address: string, method: string, abi: any) => IMethodInfo; export declare const _cutZeros: (strn: string) => string; export declare const checkNumber: (n: number | string) => number | string; export declare const formatNumber: (n: number | string, decimals?: number) => string; export declare function parseUnits(n: number | string, decimals?: number): bigint; export declare const BN: (val: number | string) => BigNumber; export declare const toBN: (n: bigint, decimals?: number) => BigNumber; export declare const toStringFromBN: (bn: BigNumber, decimals?: number) => string; export declare const fromBN: (bn: BigNumber, decimals?: number) => bigint; export declare const mulBy1_3: (n: bigint) => bigint; export declare const smartNumber: (abstractNumber: bigint | bigint[]) => number | number[]; export declare const DIGas: (gas: bigint | Array) => bigint; export declare const getGasFromArray: (gas: number[]) => number | number[]; export declare const gasSum: (gas: number[], currentGas: number | number[]) => number[]; export declare function _getCoinAddressesNoCheck(this: Curve, ...coins: string[] | string[][]): string[]; export declare function _getCoinAddresses(this: Curve, ...coins: string[] | string[][]): string[]; export declare function _getCoinDecimals(this: Curve, ...coinAddresses: string[] | string[][]): number[]; export declare function _getBalances(this: Curve, coins: string[], addresses: string[]): Promise>; export declare function _prepareAddresses(this: Curve, addresses: string[] | string[][]): string[]; export declare function _getAddress(this: Curve, address: string): string; export declare function getBalances(this: Curve, coins: string[], ...addresses: string[] | string[][]): Promise | string[]>; export declare function _getAllowance(this: Curve, coins: string[], address: string, spender: string): Promise; export declare function getAllowance(this: Curve, coins: string[], address: string, spender: string): Promise; export declare function hasAllowance(this: Curve, coins: string[], amounts: (number | string)[], address: string, spender: string): Promise; export declare function _ensureAllowance(this: Curve, coins: string[], amounts: bigint[], spender: string, isMax?: boolean): Promise; export declare function ensureAllowanceEstimateGas(this: Curve, coins: string[], amounts: (number | string)[], spender: string, isMax?: boolean): Promise; export declare function ensureAllowance(this: Curve, coins: string[], amounts: (number | string)[], spender: string, isMax?: boolean): Promise; export declare function populateApprove(this: Curve, coins: string[], amounts: (number | string)[], spender: string, isMax?: boolean, userAddress?: string): Promise; export declare function getPoolIdBySwapAddress(this: Curve, swapAddress: string): string; export declare function _getRewardsFromApi(this: Curve): Promise>; export declare function _getUsdRate(this: Curve, assetId: string): Promise; export declare function getUsdRate(this: Curve, coin: string): Promise; export declare function getBaseFeeByLastBlock(this: Curve): Promise; export declare function getGasPrice(this: Curve): Promise; export declare function getGasPriceFromL1(this: Curve): Promise; export declare function getGasPriceFromL2(this: Curve): Promise; export declare function getGasInfoForL2(this: Curve): Promise>; export declare function medianBigInt(values: bigint[]): bigint; export declare function fetchFeeHistory(provider: ethers.JsonRpcProvider | ethers.BrowserProvider, strategy: IGasStrategy): Promise<{ baseFees: bigint[]; tips: bigint[]; } | null>; export declare function computeEip1559Fees(history: { baseFees: bigint[]; tips: bigint[]; }, strategy: IGasStrategy, chainId: number): { maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; }; export declare function computeLegacyOrFallback(provider: ethers.JsonRpcProvider | ethers.BrowserProvider, strategy: IGasStrategy): Promise<{ maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; gasPrice?: bigint; }>; export declare function applyFeeDataOverride(computed: { maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; gasPrice?: bigint; }, feeData: { gasPrice?: number; maxFeePerGas?: number; maxPriorityFeePerGas?: number; }): { maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; gasPrice?: bigint; }; export declare const getTxCostsUsd: (ethUsdRate: number, gasPrice: number, gas: number | number[], gasPriceL1?: number) => number; export declare function getCurveLiteNetworks(this: Curve): Promise; export declare const getNetworkNameByChainId: (chainId: number, networks: ICurveLiteNetwork[]) => string; export declare function getNetworkConstants(this: Curve, chainId: IChainId | number): Promise>; export declare function getTVL(this: Curve, chainId?: number): Promise; export declare function getVolumeApiController(this: Curve, network: INetworkName): Promise; export declare function getVolume(this: Curve, chainId?: number): Promise<{ totalVolume: number; cryptoVolume: number; cryptoShare: number; }>; export declare function getPoolVolumes(this: Curve): Promise>; export declare function _setContracts(this: Curve, address: string, abi: any): { abi: any; contract: Contract; multicallContract: MulticallContract; }; export declare const _get_small_x: (_x: bigint, _y: bigint, x_decimals: number, y_decimals: number) => BigNumber; export declare const _get_price_impact: (_x: bigint, _y: bigint, _small_x: bigint, _small_y: bigint, x_decimals: number, y_decimals: number) => BigNumber; export declare function getCoinsData(this: Curve, ...coins: string[] | string[][]): Promise<{ name: string; symbol: string; decimals: number; }[]>; export declare function hasDepositAndStake(this: Curve): boolean; export declare function hasRouter(this: Curve): boolean; export declare const findAbiFunction: (abi: Abi, methodName: string) => AbiFunction[]; export declare const getCountArgsOfMethodByAbi: (abi: Abi, methodName: string) => number; export declare const findAbiSignature: (abi: Abi, methodName: string, signature: string) => AbiFunction | undefined; export declare const getPoolName: (name: string) => string; export declare const isStableNgPool: (name: string) => boolean; export declare const assetTypeNameHandler: (assetTypeName: string) => REFERENCE_ASSET; export declare function getBasePools(this: Curve): Promise; export declare function log(fnName: string, ...args: unknown[]): void; export declare function runWorker(code: string, syncFn: () => ((val: In) => Out) | undefined, inputData: In, timeout?: number): Promise; export declare const PERIODS: { DAY: number; WEEK: number; MONTH: number; YEAR: number; };