import { BigNumber } from "@ethersproject/bignumber"; import { Currency, Token, TradeType } from "@onyxcoindev/sdk-core-test"; import { CurrencyAmount } from "../../../util/amounts"; import { SupportedRoutes, V3Route } from "../../router"; import { IGasModel } from "../gas-models/gas-model"; import { Protocol } from "../../../constants"; import { IV3PoolProvider } from "../../../providers/v3/pool-provider"; /** * Represents a route, a quote for swapping some amount on it, and other * metadata used by the routing algorithm. * * @export * @interface IRouteWithValidQuote * @template Route */ export interface IRouteWithValidQuote { amount: CurrencyAmount; percent: number; quoteAdjustedForGas: CurrencyAmount; quote: CurrencyAmount; route: Route; gasEstimate: BigNumber; gasCostInToken: CurrencyAmount; gasCostInUSD: CurrencyAmount; gasCostInGasToken?: CurrencyAmount; tradeType: TradeType; poolAddresses: string[]; tokenPath: Currency[]; } export type IV3RouteWithValidQuote = { protocol: Protocol.V3; } & IRouteWithValidQuote; export type RouteWithValidQuote = V3RouteWithValidQuote; export type V3RouteWithValidQuoteParams = { amount: CurrencyAmount; rawQuote: BigNumber; sqrtPriceX96AfterList: BigNumber[]; initializedTicksCrossedList: number[]; quoterGasEstimate: BigNumber; percent: number; route: V3Route; gasModel: IGasModel; quoteToken: Token; tradeType: TradeType; v3PoolProvider: IV3PoolProvider; }; /** * Represents a quote for swapping on a V3 only route. Contains all information * such as the route used, the amount specified by the user, the type of quote * (exact in or exact out), the quote itself, and gas estimates. * * @export * @class V3RouteWithValidQuote */ export declare class V3RouteWithValidQuote implements IV3RouteWithValidQuote { readonly protocol = Protocol.V3; amount: CurrencyAmount; rawQuote: BigNumber; quote: CurrencyAmount; quoteAdjustedForGas: CurrencyAmount; sqrtPriceX96AfterList: BigNumber[]; initializedTicksCrossedList: number[]; quoterGasEstimate: BigNumber; percent: number; route: V3Route; quoteToken: Token; gasModel: IGasModel; gasEstimate: BigNumber; gasCostInToken: CurrencyAmount; gasCostInUSD: CurrencyAmount; gasCostInGasToken?: CurrencyAmount; tradeType: TradeType; poolAddresses: string[]; tokenPath: Token[]; toString(): string; constructor({ amount, rawQuote, sqrtPriceX96AfterList, initializedTicksCrossedList, quoterGasEstimate, percent, route, gasModel, quoteToken, tradeType, v3PoolProvider, }: V3RouteWithValidQuoteParams); }