import { Pool } from '@uniswap/v3-sdk'; import * as Uniswap from '@uniswap/sdk-core'; import { JsonRpcProvider } from 'ethers'; import { Amount, Coin, CoinAmount, ERC20, Native, Token } from '../types'; export declare const quoteReturnMapping: { [signature: string]: string[]; }; /** * Returns true if poolA is equivalent to poolB * @param poolA one of the two pools * @param poolB the other pool */ export declare function poolEquals(poolA: Pool, poolB: Pool): boolean; export declare const decimalsFunctionSig: string; export declare function getTokenDecimals(tokenAddress: string, provider: JsonRpcProvider, nativeToken: Coin): Promise; /** * Based on https://github.com/ethers-io/ethers.js/blob/main/src.ts/address/checks.ts#L51 */ export declare function isValidNonZeroAddress(address: string): boolean; export declare const isValidTokenLiteral: (address: string) => boolean; export declare const erc20ToUniswapToken: (token: ERC20) => Uniswap.Token; export declare const uniswapTokenToERC20: (token: Uniswap.Token) => ERC20; export declare const toBigNumber: (amount: Uniswap.CurrencyAmount) => bigint; export declare const toAmount: (amount: Uniswap.CurrencyAmount) => CoinAmount; export declare const toCurrencyAmount: (amount: CoinAmount) => Uniswap.CurrencyAmount; export declare const newAmount: (amount: bigint, token: T) => CoinAmount; export declare const isERC20Amount: (amount: CoinAmount) => amount is CoinAmount; export declare const isNativeAmount: (amount: CoinAmount) => amount is CoinAmount; export declare const isNative: (token: Coin) => token is Native; export declare const addAmount: (a: CoinAmount, b: CoinAmount) => { value: bigint; token: ERC20; } | { value: bigint; token: Native; }; export declare const subtractAmount: (a: CoinAmount, b: CoinAmount) => { value: bigint; token: ERC20; } | { value: bigint; token: Native; }; /** * Converts our internal token type which could be ERC20 or Native * into a format consumable by Checkout. They require an address to be * present. We populate the address with the string 'native' if it's Native. * If it's ERC20, we don't need to change it. */ export declare const toPublicTokenType: (token: Coin) => Token; export declare const toPublicAmount: (amount: CoinAmount) => Amount; export declare const getDefaultDeadlineSeconds: () => number;