export declare enum ChainSlug { TESTNET = "testnet", MAINNET = "mainnet" } export declare enum ChainID { TESTNET = "allora-testnet-1", MAINNET = "allora-mainnet-1" } export declare enum PriceInferenceToken { BTC = "BTC", ETH = "ETH" } export declare enum PriceInferenceTimeframe { FIVE_MIN = "5m", EIGHT_HOURS = "8h" } export declare enum SignatureFormat { ETHEREUM_SEPOLIA = "ethereum-11155111" } export interface AlloraAPIClientConfig { chainSlug?: ChainSlug; apiKey?: string; baseAPIUrl?: string; } export interface AlloraTopic { topic_id: number; topic_name: string; description?: string | null; epoch_length: number; ground_truth_lag: number; loss_method: string; worker_submission_window: number; worker_count: number; reputer_count: number; total_staked_allo: number; total_emissions_allo: number; is_active: boolean | null; updated_at: string; } export interface AlloraInferenceData { network_inference: string; network_inference_normalized: string; confidence_interval_percentiles: string[]; confidence_interval_percentiles_normalized: string[]; confidence_interval_values: string[]; confidence_interval_values_normalized: string[]; topic_id: string; timestamp: number; extra_data: string; } export interface AlloraInference { signature: string; inference_data: AlloraInferenceData; } export interface TopicsResponse { topics: AlloraTopic[]; continuation_token?: string | null; } export interface AlloraAPIResponse { request_id: string; status: boolean; apiResponseMessage?: string; data: T; } export declare class AlloraAPIClient { private readonly apiKey; private readonly baseAPIUrl; private readonly chainID; constructor(config: AlloraAPIClientConfig); /** * Fetches all available topics from the Allora API. * This method handles pagination automatically by following continuation tokens * until all topics have been retrieved. * * @returns {Promise} A promise that resolves to an array of all available topics * @throws {Error} If the API request fails or returns an unsuccessful status */ getAllTopics(): Promise; /** * Fetches an inference for a specific topic from the Allora API. * * @param {number} topicID - The unique identifier of the topic to get inference for * @returns {Promise} A promise that resolves to the inference data * @throws {Error} If the API request fails or returns an unsuccessful status */ getInferenceByTopicID(topicID: number, signatureFormat?: SignatureFormat): Promise; /** * Fetches a price inference for a specific asset and timeframe from the Allora API. * * @param {PriceInferenceToken} asset - The asset to get price inference for * @param {PriceInferenceTimeframe} timeframe - The timeframe to get price inference for * @returns {Promise} A promise that resolves to the inference data * @throws {Error} If the API request fails or returns an unsuccessful status */ getPriceInference(asset: PriceInferenceToken, timeframe: PriceInferenceTimeframe, signatureFormat?: SignatureFormat): Promise; getRequestUrl(endpoint: string): string; private fetchAPIResponse; } //# sourceMappingURL=api-client.d.ts.map