import { KVStore } from "@keplr-wallet/common"; import { ChainGetter, ObservableChainQuery, ObservableQueryBalances, QueryResponse } from "@keplr-wallet/stores"; import { AppCurrency, Currency } from "@keplr-wallet/types"; import { CoinPretty, Dec, IntPretty, PricePretty, RatePretty } from "@keplr-wallet/unit"; import { BasePool, ConcentratedLiquidityPoolRaw, RoutablePool, SharePool, StablePoolRaw, WeightedPoolRaw } from "@osmosis-labs/pools"; import { Duration } from "dayjs/plugin/duration"; import { IPriceStore } from "src/price"; import { ObservableQueryLiquiditiesNetInDirection } from "../concentrated-liquidity"; import { ObservableQueryNodeInfo } from "../tendermint/node-info"; import { Head } from "../utils"; import { PoolMetricsRaw } from "./types"; export declare type PoolRaw = WeightedPoolRaw | StablePoolRaw | ConcentratedLiquidityPoolRaw; /** Query store that can refresh an individual pool's data from the node. * Uses a few different concrete classes to represent the different types of pools. * Converts the common fields of the raw pool data into more useful types, such as prettified types for display. */ export declare class ObservableQueryPool extends ObservableChainQuery<{ pool: PoolRaw; }> { readonly kvStore: KVStore; readonly chainGetter: ChainGetter; readonly queryLiquiditiesInNetDirection: ObservableQueryLiquiditiesNetInDirection; readonly queryBalances: ObservableQueryBalances; readonly queryNodeInfo: ObservableQueryNodeInfo; /** Observe any new references resulting from pool or pools query. */ protected raw: PoolRaw; /** Pool metrics about this pool, that may prevent some additional querying. * They're optional because if the node is being queried directly, this data * may not be available. */ protected _availablePoolMetricsRaw?: PoolMetricsRaw | null; get poolAssetDenoms(): string[]; get pool(): BasePool & RoutablePool; get sharePool(): SharePool | undefined; /** Info specific to and relevant if is stableswap pool. */ get stableSwapInfo(): { scalingFactorController: string; scalingFactor: string[]; assets: { amountScaled: Dec; denom: string; amount: import("@keplr-wallet/unit").Int; scalingFactor: number; }[]; } | undefined; /** Info specific to and relevant if is weighted/balancer pool. */ get weightedPoolInfo(): { assets: { denom: string; amount: import("@keplr-wallet/unit").Int; weight: IntPretty; weightFraction: RatePretty; }[]; totalWeight: IntPretty; smoothWeightChange: import("@osmosis-labs/pools").SmoothWeightChangeParams | undefined; } | undefined; get concentratedLiquidityPoolInfo(): { currentSqrtPrice: import("@osmosis-labs/math").BigDec; currentPrice: Dec; multiplicationQuoteOverBase: Dec; currentTickLiquidity: Dec; tickSpacing: number; exponentAtPriceOne: number; } | undefined; get type(): "weighted" | "stable" | "concentrated"; get id(): string; get swapFee(): RatePretty; get exitFee(): RatePretty; /** Only relevant to SharePool types. */ get shareDenom(): string; /** Only relevant to SharePool types. */ get shareCurrency(): Currency; /** Only relevant to SharePool types. */ get totalShare(): CoinPretty; /** Only relevant to weighted pools. */ get smoothWeightChange(): { startTime: Date; endTime: Date; duration: Duration; initialPoolWeights: { currency: AppCurrency; weight: IntPretty; ratio: IntPretty; }[]; targetPoolWeights: { currency: AppCurrency; weight: IntPretty; ratio: IntPretty; }[]; } | undefined; get poolAssets(): { amount: CoinPretty; }[]; constructor(kvStore: KVStore, chainId: string, chainGetter: ChainGetter, queryLiquiditiesInNetDirection: ObservableQueryLiquiditiesNetInDirection, queryBalances: ObservableQueryBalances, queryNodeInfo: ObservableQueryNodeInfo, raw: PoolRaw, metricsRaw?: PoolMetricsRaw); protected canFetch(): boolean; readonly getPoolAsset: (denom: string) => { amount: CoinPretty; }; readonly hasPoolAsset: (coinMinimalDenom: string) => boolean; readonly getSpotPriceOutOverIn: (tokenInDenom: string, tokenOutDenom: string) => IntPretty; readonly getSpotPriceInOverOutWithoutSwapFee: (tokenInDenom: string, tokenOutDenom: string) => IntPretty; readonly getSpotPriceOutOverInWithoutSwapFee: (tokenInDenom: string, tokenOutDenom: string) => IntPretty; readonly getPoolMetrics: (priceStore: IPriceStore) => { liquidityUsd: PricePretty | undefined; liquidity24hUsdChange: PricePretty | undefined; volume24hUsd: PricePretty | undefined; volume24hUsdChange: PricePretty | undefined; volume7dUsd: PricePretty | undefined; } | undefined; setRaw(raw: PoolRaw): void; readonly computeTotalValueLocked: (priceStore: IPriceStore) => PricePretty; setMetricsRaw(metrics: PoolMetricsRaw): void; protected setResponse(response: Readonly>): void; /** Async & static fetch and construct a new query pool using the individual pool query. */ static makeWithoutRaw(poolId: string, ...[kvStore, chainId, chainGetter, queryLiquiditiesInNetDirection, queryBalances, queryNodeInfo,]: Head>): Promise; protected static makeEndpointUrl(poolId: string, nodeVersion?: number): string; /** Add any currencies found within pool data to the registry. */ protected static addUnknownCurrencies(raw: PoolRaw, chainGetter: ChainGetter, chainId: string, poolMetrics?: PoolMetricsRaw): void; } export declare function isSupportedPool(poolRaw: any, poolIdBlacklist?: string[]): boolean;