import { type EthereumAddress } from '@streamr/utils';
import StreamrClient from 'streamr-client';
import { StrictLogStoreClientConfig } from '../Config';
import { StrictStreamrClientConfig } from '../streamr/Config';
import { ContractFactory } from '../streamr/ContractFactory';
import { LoggerFactory } from '../streamr/LoggerFactory';
type HeartbeatInfo = {
    nodeAddress: EthereumAddress;
    publishDate: Date;
    latency: number;
};
export declare class NodeManager {
    private streamrClient;
    private contractFactory;
    private logStoreClientConfig;
    private streamrClientConfig;
    private readonly logStoreManagerContractsReadonly;
    private readonly logger;
    private readonly abort$;
    private readonly nodeUrlCache;
    private readonly lastUrlList$;
    private throttledUpdateList;
    constructor(contractFactory: ContractFactory, loggerFactory: LoggerFactory, logStoreClientConfig: Pick<StrictLogStoreClientConfig, 'contracts'>, streamrClientConfig: Pick<StrictStreamrClientConfig, 'contracts'>, streamrClient: StreamrClient);
    private getNodeFromAddress;
    private parseMetadata;
    /**
     * Returns an observable that emits a list nodes,
     * sorted in order of their latency (from lowest to highest).
     * Latency is calculated from the time the message was published to the time it was received.
     */
    get nodeListByLatency$(): import("rxjs").Observable<HeartbeatInfo[]>;
    /**
     * updateNodeUrl is a function that, when called, updates the lastUrlList$
     *
     * Steps:
     *
     * - Transforms the list of addresses in a list of URLs.
     * - After subscription, a counter is initiated after 3 seconds after the first URL is found.
     * - Otherwise it runs and times out after 15 seconds.
     * @private
     */
    private updateNodeUrlList;
    getNodeUrlsByLatency(): Promise<string[]>;
    getNodeAddressFromUrl(url: string): Promise<string | null>;
    getNodeUrl(nodeAddress: EthereumAddress, useCache?: boolean): Promise<string | null>;
    getActiveNodes(): Promise<string[]>;
    destroy(): void;
    [Symbol.dispose](): void;
}
export {};
