import { StreamID, StreamMessage, StreamMessageOptions } from '@streamr/protocol';
import { MarkRequired } from 'ts-essentials';
import { Authentication } from '../Authentication';
import { StreamRegistry } from '../registry/StreamRegistry';
import { GroupKeyQueue } from './GroupKeyQueue';
import { PublishMetadata } from './Publisher';
export interface MessageFactoryOptions {
    streamId: StreamID;
    authentication: Authentication;
    streamRegistry: Pick<StreamRegistry, 'getStream' | 'hasPublicSubscribePermission' | 'isStreamPublisher' | 'clearStreamCache'>;
    groupKeyQueue: GroupKeyQueue;
}
export declare const createSignedMessage: (opts: MarkRequired<Omit<StreamMessageOptions, 'signature'>, 'messageType'> & {
    authentication: Authentication;
}) => Promise<StreamMessage>;
export declare class MessageFactory {
    private readonly streamId;
    private readonly authentication;
    private defaultPartition;
    private readonly defaultMessageChainIds;
    private readonly prevMsgRefs;
    private readonly streamRegistry;
    private readonly groupKeyQueue;
    constructor(opts: MessageFactoryOptions);
    createMessage(content: unknown, metadata: PublishMetadata & {
        timestamp: number;
    }, explicitPartition?: number): Promise<StreamMessage>;
    private getDefaultPartition;
}
