UNPKG

@uniswap/smart-order-router

Version:
64 lines (63 loc) 1.92 kB
import { ChainId, Currency } from '@uniswap/sdk-core'; import { ProviderConfig } from '../provider'; import { SubgraphProvider } from '../subgraph-provider'; export interface V4SubgraphPool { id: string; feeTier: string; tickSpacing: string; hooks: string; liquidity: string; token0: { symbol?: string; id: string; name?: string; decimals: string; }; token1: { symbol?: string; id: string; name?: string; decimals: string; }; tvlETH: number; tvlUSD: number; } export declare type V4RawSubgraphPool = { id: string; feeTier: string; tickSpacing: string; hooks: string; liquidity: string; token0: { symbol: string; id: string; name: string; decimals: string; }; token1: { symbol: string; id: string; name: string; decimals: string; }; totalValueLockedUSD: string; totalValueLockedETH: string; totalValueLockedUSDUntracked: string; }; export declare const SUBGRAPH_URL_BY_CHAIN: { [chainId in ChainId]?: string; }; /** * Provider for getting V4 pools from the Subgraph * * @export * @interface IV4SubgraphProvider */ export interface IV4SubgraphProvider { getPools(currencyIn?: Currency, currencyOut?: Currency, providerConfig?: ProviderConfig): Promise<V4SubgraphPool[]>; } export declare class V4SubgraphProvider extends SubgraphProvider<V4RawSubgraphPool, V4SubgraphPool> implements IV4SubgraphProvider { constructor(chainId: ChainId, retries?: number, timeout?: number, rollback?: boolean, trackedEthThreshold?: number, trackedZoraEthThreshold?: number, zoraHooks?: Set<string>, untrackedUsdThreshold?: number, subgraphUrlOverride?: string, bearerToken?: string); protected mapSubgraphPool(rawPool: V4RawSubgraphPool): V4SubgraphPool; protected getPoolFields(): string; }