import { StreamPartID } from '@streamr/protocol';
import { type StrictLogStoreClientConfig } from './Config';
import { HttpUtil } from './HttpUtil';
import { LogStoreMessageStream } from './LogStoreMessageStream';
import { NodeManager } from './registry/NodeManager';
import { LoggerFactory } from './streamr/LoggerFactory';
import { MessagePipelineFactory } from './streamr/subscribe/MessagePipelineFactory';
import { type VerificationOptions } from './utils/networkValidation/validateNetworkResponses';
import { SystemMessageObservable } from './utils/SystemMessageObservable';
export declare enum QueryType {
    Last = "last",
    From = "from",
    Range = "range"
}
export type BaseHttpQuery = {
    format?: 'raw' | 'protocol' | 'object';
};
export type HttpQueryLast = {
    count: number;
};
export type HttpQueryFrom = {
    fromTimestamp: number;
    fromSequenceNumber?: number;
    publisherId?: string;
};
export type HttpQueryRange = {
    fromTimestamp: number;
    toTimestamp: number;
    fromSequenceNumber?: number;
    toSequenceNumber?: number;
    publisherId?: string;
    msgChainId?: string;
};
export type HttpApiQueryDict = (HttpQueryLast | HttpQueryFrom | HttpQueryRange) & BaseHttpQuery;
export interface QueryRef {
    timestamp: number;
    sequenceNumber?: number;
}
/**
 * Query the latest "n" messages.
 */
export interface QueryLastOptions {
    last: number;
}
/**
 * Query messages starting from a given point in time.
 */
export interface QueryFromOptions {
    from: QueryRef;
    publisherId?: string;
}
/**
 * Query messages between two points in time.
 */
export interface QueryRangeOptions {
    from: QueryRef;
    to: QueryRef;
    msgChainId?: string;
    publisherId?: string;
}
/**
 * The supported Query types.
 */
export type QueryInput = QueryLastOptions | QueryFromOptions | QueryRangeOptions;
export type QueryOptions = {
    abortSignal?: AbortSignal;
    verifyNetworkResponses?: VerificationOptions | boolean;
    raw?: boolean;
};
export declare class Queries {
    private logStoreClientConfig;
    private systemMessages$;
    private readonly nodeManager;
    private readonly httpUtil;
    private readonly logger;
    private readonly messagePipelineFactory;
    constructor(nodeManager: NodeManager, httpUtil: HttpUtil, logStoreClientConfig: StrictLogStoreClientConfig, loggerFactory: LoggerFactory, systemMessages$: SystemMessageObservable, messagePipelineFactory: MessagePipelineFactory);
    query(streamPartId: StreamPartID, input: QueryInput, options?: QueryOptions): Promise<LogStoreMessageStream>;
    private fetchStream;
    createUrl(baseUrl: string, endpointSuffix: string, streamPartId: StreamPartID, query?: HttpApiQueryDict | object): string;
    getAuth(): Promise<{
        user: import("@streamr/utils").EthereumAddress;
        password: string;
        token: string;
    }>;
}
