UNPKG

@plasma-fi/sdk

Version:

🛠 An SDK for building dapp on PlasmaSwap.

32 lines (31 loc) • 1.34 kB
import { CurrencyAmount, Percent, Price } from '../../amounts'; import { TradeType } from '../../constants/constants'; export declare abstract class BaseTrade { /** * The type of the trade, either exact in or exact out. */ readonly tradeType: TradeType; /** * The input amount for the trade assuming no slippage. */ readonly inputAmount: CurrencyAmount; /** * The output amount for the trade assuming no slippage. */ readonly outputAmount: CurrencyAmount; /** * The price expressed in terms of output amount/input amount. */ readonly executionPrice: Price; protected constructor(tradeType: TradeType, inputAmount: CurrencyAmount, outputAmount: CurrencyAmount); /** * Get the minimum amount that must be received from this trade for the given slippage tolerance * @param slippageTolerance tolerance of unfavorable slippage from the execution price of this trade */ minimumAmountOut(slippageTolerance: Percent): CurrencyAmount; /** * Get the maximum amount in that can be spent via this trade for the given slippage tolerance * @param slippageTolerance tolerance of unfavorable slippage from the execution price of this trade */ maximumAmountIn(slippageTolerance: Percent): CurrencyAmount; }