import { Address } from 'viem'; import { Percent } from '../fractions/percent'; import { BigintIsh } from '../constants/internalConstants'; import { Token } from '../constants'; import { Price } from '../fractions/Price'; export declare const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; export declare function validateAndParseAddress(address: string): Address; export type TokenAmounts = { token0Amount: BigintIsh; token1Amount: BigintIsh; }; export declare function adjustForSlippage(n: BigintIsh, { numerator, denominator }: Percent, adjustUp: boolean): bigint; export declare function adjustForTokenSlippage(tokenAmount: TokenAmounts, slippage: Percent, adjustUp: boolean): { tokenLimit0: bigint; tokenLimit1: bigint; }; export declare function parseProtocolFees(feeProtocol: number | string): Percent[]; /** * Returns the sqrt ratio as a Q64.96 corresponding to a given ratio of amount1 and amount0 * @param amount1 The numerator amount i.e., the amount of token1 * @param amount0 The denominator amount i.e., the amount of token0 * @returns The sqrt ratio */ export declare function encodeSqrtRatioX96(amount1: BigintIsh, amount0: BigintIsh): bigint; export declare function decodeSqrtRatioX96(sqrtRatioX96: bigint): [bigint, bigint]; export declare function calculatePriceStep(price: Price, tickSpacing: number): string; /** * 是否是正向 * @param address0 * @param address1 * @returns */ export declare function isDirect(address0: string, address1: string): boolean; export declare function sqrt(y: bigint): bigint; export declare function calculateGasMargin(value: bigint, margin?: bigint): bigint;