@zentraswap/router-sdk
Version:
An sdk for routing swaps using Zentra X v2 and Zentra X v3.
30 lines (29 loc) • 1.03 kB
TypeScript
import { Currency, Price, Token } from '@zentraswap/sdk-core';
import { Pool } from '@zentraswap/v3-sdk';
import { Pair } from '@zentraswap/v2-sdk';
declare type TPool = Pair | Pool;
/**
* Represents a list of pools or pairs through which a swap can occur
* @template TInput The input token
* @template TOutput The output token
*/
export declare class MixedRouteSDK<TInput extends Currency, TOutput extends Currency> {
readonly pools: TPool[];
readonly path: Token[];
readonly input: TInput;
readonly output: TOutput;
private _midPrice;
/**
* Creates an instance of route.
* @param pools An array of `TPool` objects (pools or pairs), ordered by the route the swap will take
* @param input The input token
* @param output The output token
*/
constructor(pools: TPool[], input: TInput, output: TOutput);
get chainId(): number;
/**
* Returns the mid price of the route
*/
get midPrice(): Price<TInput, TOutput>;
}
export {};