hermes-swap-router-sdk
Version:
An sdk for routing swaps using Uniswap v2, Uniswap v3 and Balancer Stable Pools.
37 lines (36 loc) • 2.15 kB
TypeScript
import { ComposableStablePool, ComposableStablePoolWrapper, Pair, Pool, Route as V3RouteSDK, V2RouteSDK } from 'hermes-v2-sdk';
import { Currency, NativeToken, Price } from 'maia-core-sdk';
import { MixedRouteSDK, TPool as TypePool } from './mixedRoute/route';
import { Protocol } from './protocol';
export interface IRoute<TInput extends Currency, TOutput extends Currency, TPool extends TypePool> {
protocol: Protocol;
pools: TPool[];
path: NativeToken[];
midPrice: Price<TInput, TOutput>;
input: TInput;
output: TOutput;
}
export declare class RouteV2<TInput extends Currency, TOutput extends Currency> extends V2RouteSDK<TInput, TOutput> implements IRoute<TInput, TOutput, Pair> {
readonly protocol: Protocol;
readonly pools: Pair[];
constructor(v2Route: V2RouteSDK<TInput, TOutput>);
}
export declare class RouteV3<TInput extends Currency, TOutput extends Currency> extends V3RouteSDK<Pool, TInput, TOutput> implements IRoute<TInput, TOutput, Pool> {
readonly protocol: Protocol;
readonly path: NativeToken[];
constructor(v3Route: V3RouteSDK<Pool, TInput, TOutput>);
}
export declare class RouteStable<TInput extends Currency, TOutput extends Currency> extends V3RouteSDK<ComposableStablePool, TInput, TOutput> implements IRoute<TInput, TOutput, ComposableStablePool> {
readonly protocol: Protocol;
readonly path: NativeToken[];
constructor(stableRoute: V3RouteSDK<ComposableStablePool, TInput, TOutput>);
}
export declare class RouteStableWrapper<TInput extends Currency, TOutput extends Currency> extends V3RouteSDK<ComposableStablePoolWrapper, TInput, TOutput> implements IRoute<TInput, TOutput, ComposableStablePoolWrapper> {
readonly protocol: Protocol;
readonly path: NativeToken[];
constructor(stableRoute: V3RouteSDK<ComposableStablePoolWrapper, TInput, TOutput>);
}
export declare class MixedRoute<TInput extends Currency, TOutput extends Currency> extends MixedRouteSDK<TInput, TOutput> implements IRoute<TInput, TOutput, TypePool> {
readonly protocol: Protocol;
constructor(mixedRoute: MixedRouteSDK<TInput, TOutput>);
}