import { KVStore } from "@keplr-wallet/common"; import { ChainGetter, ObservableQueryBalances, QueryResponse } from "@keplr-wallet/stores"; import { ObservableQueryNodeInfo } from "src/queries/tendermint/node-info"; import { ObservableQueryLiquiditiesNetInDirection } from "../../queries"; import { ObservableQueryNumPools, ObservableQueryPool, ObservableQueryPoolGetter } from "../../queries/pools"; import { ObservableQueryExternalBase } from "../base"; import { FilteredPools, Filters, Pagination } from "./types"; /** TEMPORARY: use imperator query to fetch filtered, sorted pools. * * Avoids fetching pools until necessary. Will fetch pools individually until all pools are requested, * then it will fetch the top pools by liquidity until the remaining pools are explicitly requested. * * TODO: This query includes token price and pool liquidity and volume data that is currently ignored. * we could use that data to prevent other queries in the app, perhaps by adding some sort of * store hydration mechanism to get this data into other query stores and preventing those stores from querying until needed. * This could potentially grant additional performance improvements. */ export declare class ObservableQueryFilteredPools extends ObservableQueryExternalBase implements ObservableQueryPoolGetter { protected readonly chainId: string; protected readonly chainGetter: ChainGetter; protected readonly queryNumPools: ObservableQueryNumPools; readonly queryLiquiditiesInNetDirection: ObservableQueryLiquiditiesNetInDirection; readonly queryBalances: ObservableQueryBalances; readonly queryNodeInfo: ObservableQueryNodeInfo; protected readonly baseUrl: string; protected readonly poolIdBlacklist: string[]; protected _pools: Map; protected _nonExistentPoolsSet: Set; protected _fetchingPoolIds: Set; protected _queryParams: Filters & Pagination; protected _canFetch: boolean; constructor(kvStore: KVStore, chainId: string, chainGetter: ChainGetter, queryNumPools: ObservableQueryNumPools, queryLiquiditiesInNetDirection: ObservableQueryLiquiditiesNetInDirection, queryBalances: ObservableQueryBalances, queryNodeInfo: ObservableQueryNodeInfo, baseUrl?: string, poolIdBlacklist?: string[], initialFilters?: Filters, initialPagination?: Pagination); /** We'll only use the pools query if all pools are requested. */ protected canFetch(): boolean; protected setResponse(response: Readonly>): void; /** Returns `undefined` if the pool does not exist or the data has not loaded. */ readonly getPool: (id: string) => ObservableQueryPool | undefined; /** Returns `undefined` if pool data has not loaded, and `true`/`false` for if the pool exists. */ readonly poolExists: (id: string) => boolean | undefined; /** Gets all pools that have been fetched with current filter settings. Does not guarauntee any sort of order. */ readonly getAllPools: () => ObservableQueryPool[]; paginate(): Promise; fetchRemainingPools(limit?: number): Promise; protected setUrlToQueryParamsAndFetch(): Promise> | undefined>; }