import type { Network } from "@saberhq/solana-contrib"; import type { Price, Token, TokenAmount } from "@saberhq/token-utils"; import type { Action } from "../../wrappers/actionPlan"; import { WrappedToken } from "../wrappedToken"; import type { StableSwapPool } from "./stableSwap"; import type { PoolOutputResult, PoolStrategy } from "./strategy"; export * from "./addDecimals"; export * from "./stableSwap"; export * from "./strategy"; /** * Represents a swap pair. * * A pair consists of two parts: * - the underlying pool, and * - the strategy, which determines how the pool should be traded. * * Unlike UniswapV2, there may be multiple pairs for a given set of two tokens. * For example: there could exist both a StableSwap and a CP-AMM pair for two * tokens. It is up to the trade calculator to determine */ export declare class Pair
{ readonly pool: P; readonly strategy: PoolStrategy
; /** * * @param pool underlying pool object * @param reserves * @param liquidityToken * @param strategy */ constructor(pool: P, strategy: PoolStrategy
);
/**
* Returns true if the token is either token0 or token1
* @param token to check
*/
involvesToken(token: Token): boolean;
/**
* Returns the current mid price of the pair in terms of token0, i.e. the ratio of reserve1 to reserve0
*/
get token0Price(): Price;
/**
* Returns the current mid price of the pair in terms of token1, i.e. the ratio of reserve0 to reserve1
*/
get token1Price(): Price;
/**
* Return the price of the given token in terms of the other token in the pair.
* @param token token to return price of
*/
priceOf(token: Token): Price;
/**
* Returns the chain ID of the tokens in the pair.
*/
get network(): Network;
get token0(): Token;
get token1(): Token;
hasZeroLiquidity(): boolean;
getOutputAmount(inputAmount: TokenAmount): Omit