import { Token } from '@uniswap/sdk'; import { IAsset, INetwork } from '..'; export type IRouterType = 'pancake' | 'uniswap' | string; export type IChangeAmountParams = { network: INetwork; inAsset: IAsset; outAsset: IAsset; amount: string; routers: { type: IRouterType; address: string; }[]; }; export type IChangeAmountResponse = { path: Token[]; quotes: { inAmount: string; outAmount: string; type: IRouterType; }[]; }; export interface IPrepareToSwapParams { /** * account address */ from: string; inAsset: IAsset; outAsset: IAsset; type: 'EXACT_INPUT' | 'EXACT_OUTPUT'; inAmount: string; outAmount: string; /** * Timeout unit: second */ timeout: number; network: INetwork; gas?: { gasPrice?: string; gasLimit?: string; maxPriorityFeePerGas?: string; maxFeePerGas?: string; }; config: { swapContract: string; path: Token[]; routerContract?: string; }; } export type IPrepareToWrapOrUnwrapParams = Omit< IPrepareToSwapParams, 'config' | 'inAmount' | 'outAmount' | 'timeout' | 'type' > & { amount: string; }; export enum WrapDirection { Wrap = 'wrap', Unwrap = 'unwrap', } export interface ITradePathParams { network: INetwork; inAsset: IAsset; outAsset: IAsset; type: 'EXACT_INPUT' | 'EXACT_OUTPUT'; amount: string; }