UNPKG

@koyofinance/sor

Version:
23 lines 1.47 kB
import { NewPath, PoolDictionary, SubgraphPoolBase, SwapOptions, SwapTypes } from '@balancer-labs/sor'; import type { RouteProposerService } from '../types/proposal'; import type { KoyoSorConfig } from '../types/sor'; export declare class RouteProposer implements RouteProposerService { private readonly config; private readonly cache; constructor(config: KoyoSorConfig); /** * Given a list of pools and a desired input/output, returns a set of possible paths to route through */ getCandidatePaths(tokenIn: string, tokenOut: string, swapType: SwapTypes, pools: SubgraphPoolBase[], swapOptions: SwapOptions): NewPath[]; /** * Given a pool dictionary and a desired input/output, returns a set of possible paths to route through. * @param {string} tokenIn - Address of tokenIn * @param {string} tokenOut - Address of tokenOut * @param {SwapTypes} swapType - SwapExactIn where the amount of tokens in (sent to the Pool) is known or SwapExactOut where the amount of tokens out (received from the Pool) is known. * @param {PoolDictionary} poolsAllDict - Dictionary of pools. * @param {number }maxPools - Maximum number of pools to hop through. * @returns {NewPath[]} Array of possible paths sorted by liquidity. */ getCandidatePathsFromDict(tokenIn: string, tokenOut: string, swapType: SwapTypes, poolsAllDict: PoolDictionary, maxPools: number): NewPath[]; } //# sourceMappingURL=proposer.d.ts.map