UNPKG

hermes-swap-router-sdk

Version:

An sdk for routing swaps using Uniswap v2, Uniswap v3 and Balancer Stable Pools.

13 lines (12 loc) 740 B
import { TradeType, V2Trade } from 'hermes-v2-sdk'; import { Currency } from 'maia-core-sdk'; import { SwapOptions } from '../../swapRouter'; /** * @notice Generates the calldata for a Swap with a V2 Route. * @param trade The V2Trade 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 encodeV2Swap(trade: V2Trade<Currency, Currency, TradeType>, options: SwapOptions, routerMustCustody: boolean, performAggregatedSlippageCheck: boolean): string;