/**
 * Wrapper around PushPipeline specific to StreamMessages.
 * Subscriptions are MessageStreams.
 * Not all MessageStreams are Subscriptions.
 */
import { EncryptedGroupKey, MessageID, MessageRef, StreamMessage } from '@streamr/protocol';
import { Observable } from 'rxjs';
import { Message, MessageListener } from 'streamr-client';
import type { RequestMetadata } from './HttpUtil';
import { IPushPipeline } from './streamr/utils/IPushPipeline';
import { PushBuffer } from './streamr/utils/PushBuffer';
export type LogStoreMessageMetadata = {
    id: MessageID;
    prevMsgRef: MessageRef | null;
    messageType: number;
    contentType: number;
    encryptionType: number;
    groupKeyId: string | null;
    newGroupKey: EncryptedGroupKey | null;
    signature: string;
};
export type LogStoreMessage = {
    content: unknown;
    metadata: LogStoreMessageMetadata;
};
/**
 * Provides asynchronous iteration with
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of | for await .. of}.
 */
export declare class LogStoreMessageStream implements AsyncIterable<LogStoreMessage> {
    messageStream: PushBuffer<string | StreamMessage> | IPushPipeline<StreamMessage, StreamMessage>;
    metadataStream: Observable<RequestMetadata>;
    private messages$;
    constructor(messageStream: PushBuffer<string | StreamMessage> | IPushPipeline<StreamMessage, StreamMessage>, metadataStream: Observable<RequestMetadata>);
    /**
     * Attach a legacy onMessage handler and consume if necessary.
     * onMessage is passed parsed content as first arument, and streamMessage as second argument.
     */
    useLegacyOnMessageHandler(onMessage: MessageListener): this;
    asObservable(): Observable<import("rxjs").ObservedValueOf<this>>;
    [Symbol.asyncIterator](): AsyncIterator<LogStoreMessage>;
}
export declare const convertStreamMessageToMessage: (msg: StreamMessage) => Message;
export declare const convertStreamMessageToLogStoreMessage: (msg: StreamMessage) => LogStoreMessage;
