UNPKG

astra-router-sdk

Version:

An sdk for routing swaps using Astra Classic and Astra CL.

29 lines (28 loc) 1 kB
import { Currency, Price } from 'astra-sdk-core'; import { TPool } from '../../utils/TPool'; /** * 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: Currency[]; readonly input: TInput; readonly output: TOutput; readonly pathInput: Currency; readonly pathOutput: Currency; 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>; }