import { ObservableQuery } from "../common"; import { CoinGeckoSimplePrice } from "./types"; import { KVStore } from "@keplr-wallet/common"; import { CoinPretty, PricePretty } from "@keplr-wallet/unit"; import { FiatCurrency } from "@keplr-wallet/types"; import { DeepReadonly } from "utility-types"; declare class Throttler { readonly duration: number; protected fns: (() => void)[]; private timeoutId?; constructor(duration: number); call(fn: () => void): void; protected callback: () => void; } export declare class CoinGeckoPriceStore extends ObservableQuery { protected readonly kvStore: KVStore; protected _isInitialized: boolean; private _coinIds; private _vsCurrencies; protected _defaultVsCurrency: string; protected _supportedVsCurrencies: { [vsCurrency: string]: FiatCurrency | undefined; }; protected _throttler: Throttler; protected _optionUri: string; constructor(kvStore: KVStore, supportedVsCurrencies: { [vsCurrency: string]: FiatCurrency; }, defaultVsCurrency: string, options?: { readonly baseURL?: string; readonly uri?: string; readonly throttleDuration?: number; }); protected onStart(): Promise; init(): Promise; protected waitUntilInitialized(): Promise; get isInitialized(): boolean; get defaultVsCurrency(): string; setDefaultVsCurrency(defaultVsCurrency: string): void; get supportedVsCurrencies(): DeepReadonly<{ [vsCurrency: string]: FiatCurrency | undefined; }>; getFiatCurrency(currency: string): FiatCurrency | undefined; protected canFetch(): boolean; protected fetchResponse(abortController: AbortController): Promise<{ headers: any; data: CoinGeckoSimplePrice; }>; protected updateURL(coinIds: string[], vsCurrencies: string[], forceSetUrl?: boolean): void; protected getCacheKey(): string; getPrice(coinId: string, vsCurrency?: string): number | undefined; calculatePrice(coin: CoinPretty, vsCurrrency?: string): PricePretty | undefined; waitPrice(coinId: string, vsCurrency?: string): Promise; waitFreshPrice(coinId: string, vsCurrency?: string): Promise; waitCalculatePrice(coin: CoinPretty, vsCurrrency?: string): Promise; waitFreshCalculatePrice(coin: CoinPretty, vsCurrrency?: string): Promise; } export {};