import { StreamID, UserID } from '@streamr/utils';
import { StreamMetadata } from '../StreamMetadata';
import { InternalPermissionAssignment, InternalPermissionQuery } from '../permission';
import { InternalSearchStreamsPermissionFilter } from './searchStreams';
export interface StreamQueryResult {
    id: string;
    metadata: string;
}
export interface StreamCreationEvent {
    readonly streamId: StreamID;
    readonly metadata: StreamMetadata;
    readonly blockNumber: number;
}
export declare class StreamRegistry {
    private streamRegistryContract?;
    private readonly streamRegistryContractReadonly;
    private readonly contractFactory;
    private readonly rpcProviderSource;
    private readonly theGraphClient;
    private readonly streamIdBuilder;
    private readonly identity;
    private readonly logger;
    private readonly metadataCache;
    private readonly publisherCache;
    private readonly subscriberCache;
    private readonly publicSubscribePermissionCache;
    private connectToContract;
    createStream(streamId: StreamID, metadata: StreamMetadata): Promise<void>;
    private ensureStreamIdInNamespaceOfAuthenticatedUser;
    setStreamMetadata(streamId: StreamID, metadata: StreamMetadata): Promise<void>;
    deleteStream(streamIdOrPath: string): Promise<void>;
    private streamExistsOnChain;
    private getStreamMetadata_nonCached;
    searchStreams(term: string | undefined, permissionFilter: InternalSearchStreamsPermissionFilter | undefined): AsyncGenerator<StreamID>;
    getStreamPublishers(streamIdOrPath: string): AsyncIterable<UserID>;
    getStreamSubscribers(streamIdOrPath: string): AsyncIterable<UserID>;
    private getStreamPublishersOrSubscribersList;
    private static buildStreamPublishersOrSubscribersQuery;
    hasPermission(query: InternalPermissionQuery): Promise<boolean>;
    getPermissions(streamIdOrPath: string): Promise<InternalPermissionAssignment[]>;
    grantPermissions(streamIdOrPath: string, ...assignments: InternalPermissionAssignment[]): Promise<void>;
    revokePermissions(streamIdOrPath: string, ...assignments: InternalPermissionAssignment[]): Promise<void>;
    private updatePermissions;
    setPermissions(...items: {
        streamId: string;
        assignments: InternalPermissionAssignment[];
    }[]): Promise<void>;
    private isStreamPublisherOrSubscriber_nonCached;
    getStreamMetadata(streamId: StreamID): Promise<StreamMetadata>;
    isStreamPublisher(streamId: StreamID, userId: UserID): Promise<boolean>;
    isStreamSubscriber(streamId: StreamID, userId: UserID): Promise<boolean>;
    hasPublicSubscribePermission(streamId: StreamID): Promise<boolean>;
    populateMetadataCache(streamId: StreamID, metadata: StreamMetadata): void;
    invalidatePermissionCaches(streamId: StreamID): void;
}
