hermes-swap-router-sdk
Version:
An sdk for routing swaps using Uniswap v2, Uniswap v3 and Balancer Stable Pools.
22 lines (21 loc) • 1.21 kB
TypeScript
import { TradeType } from 'hermes-v2-sdk';
import { Currency } from 'maia-core-sdk';
import { MixedRouteSDK } from '../../../entities/mixedRoute/route';
import { MixedRouteTrade } from '../../../entities/mixedRoute/trade';
import { SwapOptions } from '../../../swapRouter';
export declare type EncodingParams = {
route: MixedRouteSDK<Currency, Currency>;
amountIn: string;
amountOutMinimum: string;
recipient: string;
};
/**
* @notice Generates the calldata for a MixedRouteSwap. Since single hop routes are not MixedRoutes, we will
* instead generate them via the existing encodeV3Swap and encodeV2Swap methods.
* @param trade The MixedRouteTrade to encode.
* @param options SwapOptions to use for the trade.
* @param routerMustCustody Flag for whether funds should be sent to the router
* @param performAggregatedSlippageCheck Flag for whether we want to perform an aggregated slippage check
* @returns A string array of calldatas for the trade.
*/
export declare function encodeMixedRouteSwap(trade: MixedRouteTrade<Currency, Currency, TradeType>, options: SwapOptions, routerMustCustody: boolean, performAggregatedSlippageCheck: boolean): string[];