import { BigNumber } from '@ethersproject/bignumber'; import { PopulatedTransaction } from '@ethersproject/contracts'; import { BigNumberish } from 'ethers'; import { Query } from '../module'; import { SynapseSDK } from '../sdk'; import { SwapQuote, SwapQuoteV2, SwapV2Parameters } from '../types'; export declare function swapV2(this: SynapseSDK, params: SwapV2Parameters): Promise; /** * Performs a swap through a Synapse Router. * * @param chainId The chain ID * @param to The recipient address * @param token The token to swap * @param amount The swap amount * @param query The swap quote query * @returns A populated transaction to perform the swap * @throws Will throw an error if SynapseRouter is not deployed on the given chain. */ export declare function swap(this: SynapseSDK, chainId: number, to: string, token: string, amount: BigNumberish, query: Query): Promise; /** * Gets a swap quote from a Synapse Router. * * @param chainId The chain ID * @param tokenIn The input token * @param tokenOut The output token * @param amountIn The input amount * @param deadline The deadline to use for the swap. Optional, will default to 10 minutes from now. * @returns The swap quote (query, max amount out, and router address) * @throws Will throw an error if SynapseRouter is not deployed on the given chain. */ export declare function swapQuote(this: SynapseSDK, chainId: number, tokenIn: string, tokenOut: string, amountIn: BigNumberish, deadline?: BigNumber): Promise; /** * Applies a deadline to the given swap query. * * @param queryInitial - The swap query * @param deadline - The deadline to apply (optional, defaults to 10 minutes from now) * @returns The swap query with deadline applied */ export declare const applySwapDeadline: (queryInitial: Query, deadline?: BigNumber | undefined) => Query; /** * Applies slippage to the given swap query. * Note: default slippage is 10 bips (0.1%). * * @param queryInitial - The swap query, coming from `swapQuote()` * @param slipNumerator - The numerator of the slippage percentage, defaults to 10 * @param slipDenominator - The denominator of the slippage percentage, defaults to 10000 * @returns The swap query with slippage applied */ export declare const applySwapSlippage: (queryInitial: Query, slipNumerator?: number, slipDenominator?: number) => Query;