import { StreamID, StreamMessage, StreamMessageOptions } from '@streamr/protocol';
import { MarkRequired } from 'ts-essentials';
import { Authentication } from '../Authentication';
import { StreamRegistry } from '../contracts/StreamRegistry';
import { GroupKeyQueue } from './GroupKeyQueue';
import { PublishMetadata } from './Publisher';
import { ERC1271ContractFacade } from '../contracts/ERC1271ContractFacade';
export interface MessageFactoryOptions {
    streamId: StreamID;
    authentication: Authentication;
    streamRegistry: Pick<StreamRegistry, 'getStream' | 'hasPublicSubscribePermission' | 'isStreamPublisher' | 'clearStreamCache'>;
    groupKeyQueue: GroupKeyQueue;
    erc1271ContractFacade: ERC1271ContractFacade;
}
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;
    private readonly erc1271ContractFacade;
    private firstMessage;
    constructor(opts: MessageFactoryOptions);
    createMessage(content: unknown, metadata: PublishMetadata & {
        timestamp: number;
    }, explicitPartition?: number): Promise<StreamMessage>;
    private getPublisherId;
    private getDefaultPartition;
}
