UNPKG

hermes-v2-sdk

Version:

⚒️ An SDK for building applications on top of Hermes V2

32 lines (31 loc) 1.11 kB
import { Currency, NativeToken, Price } from 'maia-core-sdk'; import { ComposableStablePool, Pool } from '..'; import { Vault } from '../vault'; /** * Represents a pool that can be used in this route class */ export declare type IPool = Pool | ComposableStablePool | Vault; /** * Represents a list of pools through which a swap can occur * @template TInput The input token * @template TOutput The output token */ export declare class Route<TPool extends IPool, TInput extends Currency, TOutput extends Currency> { readonly pools: TPool[]; readonly tokenPath: NativeToken[]; readonly input: TInput; readonly output: TOutput; private _midPrice; /** * Creates an instance of route. * @param pools An array of `Pool` objects, 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>; }