UNPKG

ttxd-alpha

Version:

An SDK for building applications on top of V2,V3 and Solana exchanges

13 lines (12 loc) 650 B
import { SwapV2Params } from './type'; /** * Swap tokens using Uniswap V2 * @param chainId - ChainId (e.g., ChainId.BASE, ChainId.ETHEREUM) * @param exchange - Exchange name (e.g., 'uniswap', 'sushiswapv2') * @param token1 - Input token (Token instance) * @param token2 - Output token (Token instance) * @param amount - Amount of input token to swap (as string) * @param provider - Ethers.js provider instance * @param signer - Ethers.js signer instance */ export declare function swapV2({ chainId, exchange, token1, token2, amount, provider, signer, gasLimit, maxFeePerGas, maxPriorityFeePerGas }: SwapV2Params): Promise<void>;