astra-universal-router-sdk
Version:
sdk for integrating with the Astra Router contracts
22 lines (21 loc) • 920 B
TypeScript
import { Interface } from '@ethersproject/abi';
import { BigNumberish } from 'ethers';
import { MethodParameters } from 'astra-cl-sdk-dev';
import { Trade as RouterTrade } from 'astra-router-sdk';
import { Currency, TradeType } from 'astra-sdk-core';
import { SwapOptions } from './entities/actions/astra';
export declare type SwapRouterConfig = {
sender?: string;
deadline?: BigNumberish;
};
export declare abstract class SwapRouter {
static INTERFACE: Interface;
static swapCallParameters(trades: RouterTrade<Currency, Currency, TradeType>, options: SwapOptions): MethodParameters;
/**
* Encodes a planned route into a method name and parameters for the Router contract.
* @param planner the planned route
* @param nativeCurrencyValue the native currency value of the planned route
* @param config the router config
*/
private static encodePlan;
}