import { StreamID } from '@streamr/protocol';
import { EthereumAddress } from '@streamr/utils';
import { Stream, StreamMetadata } from '../Stream';
import { PermissionAssignment, PermissionQuery } from '../permission';
import { SearchStreamsOrderBy, SearchStreamsPermissionFilter } 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 streamRegistryContractsReadonly;
    private readonly streamFactory;
    private readonly contractFactory;
    private readonly theGraphClient;
    private readonly streamIdBuilder;
    private readonly authentication;
    private readonly logger;
    private readonly getStream_cached;
    private readonly isStreamPublisher_cached;
    private readonly isStreamSubscriber_cached;
    private readonly hasPublicSubscribePermission_cached;
    private parseStream;
    private connectToContract;
    createStream(streamId: StreamID, metadata: StreamMetadata): Promise<Stream>;
    private ensureStreamIdInNamespaceOfAuthenticatedUser;
    updateStream(streamId: StreamID, metadata: Partial<StreamMetadata>): Promise<Stream>;
    deleteStream(streamIdOrPath: string): Promise<void>;
    private streamExistsOnChain;
    private getStream_nonCached;
    searchStreams(term: string | undefined, permissionFilter: SearchStreamsPermissionFilter | undefined, orderBy: SearchStreamsOrderBy): AsyncIterable<Stream>;
    getStreamPublishers(streamIdOrPath: string): AsyncIterable<EthereumAddress>;
    getStreamSubscribers(streamIdOrPath: string): AsyncIterable<EthereumAddress>;
    private getStreamPublishersOrSubscribersList;
    private static buildStreamPublishersOrSubscribersQuery;
    hasPermission(query: PermissionQuery): Promise<boolean>;
    getPermissions(streamIdOrPath: string): Promise<PermissionAssignment[]>;
    grantPermissions(streamIdOrPath: string, ...assignments: PermissionAssignment[]): Promise<void>;
    revokePermissions(streamIdOrPath: string, ...assignments: PermissionAssignment[]): Promise<void>;
    private updatePermissions;
    setPermissions(...items: {
        streamId: string;
        assignments: PermissionAssignment[];
    }[]): Promise<void>;
    private isStreamPublisher_nonCached;
    private isStreamSubscriber_nonCached;
    getStream(streamId: StreamID, useCache?: boolean): Promise<Stream>;
    isStreamPublisher(streamId: StreamID, ethAddress: EthereumAddress, useCache?: boolean): Promise<boolean>;
    isStreamSubscriber(streamId: StreamID, ethAddress: EthereumAddress, useCache?: boolean): Promise<boolean>;
    hasPublicSubscribePermission(streamId: StreamID): Promise<boolean>;
    clearStreamCache(streamId: StreamID): void;
}
