import { EthereumAddress, StreamID, TheGraphClient } from '@streamr/utils';
import { Identity } from '../identity/Identity';
import { StrictStreamrClientConfig } from '../Config';
import { RpcProviderSource } from '../RpcProviderSource';
import { StreamIDBuilder } from '../StreamIDBuilder';
import { StreamMetadata } from '../StreamMetadata';
import { StreamrClientEventEmitter } from '../events';
import { LoggerFactory } from '../utils/LoggerFactory';
import { ChainEventPoller } from './ChainEventPoller';
import { ContractFactory } from './ContractFactory';
export interface StorageNodeAssignmentEvent {
    readonly streamId: StreamID;
    readonly nodeAddress: EthereumAddress;
    readonly blockNumber: number;
}
/**
 * Stores storage node assignments (mapping of streamIds <-> storage nodes addresses)
 */
export declare class StreamStorageRegistry {
    private streamStorageRegistryContract?;
    private readonly streamStorageRegistryContractReadonly;
    private readonly streamIdBuilder;
    private readonly contractFactory;
    private readonly rpcProviderSource;
    private readonly theGraphClient;
    private readonly config;
    private readonly identity;
    private readonly logger;
    private readonly storageNodesCache;
    constructor(streamIdBuilder: StreamIDBuilder, contractFactory: ContractFactory, rpcProviderSource: RpcProviderSource, chainEventPoller: ChainEventPoller, theGraphClient: TheGraphClient, config: Pick<StrictStreamrClientConfig, 'contracts' | 'cache' | '_timeouts'>, identity: Identity, eventEmitter: StreamrClientEventEmitter, loggerFactory: LoggerFactory);
    private initStreamAssignmentEventListeners;
    private connectToContract;
    addStreamToStorageNode(streamIdOrPath: string, nodeAddress: EthereumAddress): Promise<void>;
    removeStreamFromStorageNode(streamIdOrPath: string, nodeAddress: EthereumAddress): Promise<void>;
    isStoredStream(streamIdOrPath: string, nodeAddress: EthereumAddress): Promise<boolean>;
    getStoredStreams(nodeAddress: EthereumAddress): Promise<{
        streams: {
            id: StreamID;
            metadata: StreamMetadata;
        }[];
        blockNumber: number;
    }>;
    getStorageNodes(streamIdOrPath?: string): Promise<EthereumAddress[]>;
    private getStorageNodes_nonCached;
}
