import { StreamID, StreamPartID, UserID } from '@streamr/utils';
import { ContentType, EncryptedGroupKey, EncryptionType, SignatureType } from '@streamr/trackerless-network';
import { MessageID } from './MessageID';
import { MessageRef } from './MessageRef';
export declare enum StreamMessageType {
    MESSAGE = 0,
    GROUP_KEY_REQUEST = 1,
    GROUP_KEY_RESPONSE = 2
}
export interface StreamMessageOptions {
    messageId: MessageID;
    prevMsgRef?: MessageRef;
    messageType?: StreamMessageType;
    content: Uint8Array;
    contentType: ContentType;
    signature: Uint8Array;
    signatureType: SignatureType;
    encryptionType: EncryptionType;
    groupKeyId?: string;
    newGroupKey?: EncryptedGroupKey;
}
/**
 * Encrypted StreamMessage.
 */
export type StreamMessageAESEncrypted = StreamMessage & {
    encryptionType: EncryptionType.AES;
    groupKeyId: string;
};
/**
 * An internal class representing a message in a stream. Applications see instances of the Message class.
 */
export declare class StreamMessage implements StreamMessageOptions {
    readonly messageId: MessageID;
    readonly prevMsgRef?: MessageRef;
    readonly messageType: StreamMessageType;
    readonly content: Uint8Array;
    readonly contentType: ContentType;
    readonly signature: Uint8Array;
    readonly signatureType: SignatureType;
    readonly encryptionType: EncryptionType;
    readonly groupKeyId?: string;
    readonly newGroupKey?: EncryptedGroupKey;
    constructor({ messageId, prevMsgRef, messageType, content, contentType, signature, signatureType, encryptionType, groupKeyId, newGroupKey, }: StreamMessageOptions);
    getStreamId(): StreamID;
    getStreamPartition(): number;
    getStreamPartID(): StreamPartID;
    getTimestamp(): number;
    getSequenceNumber(): number;
    getPublisherId(): UserID;
    getMsgChainId(): string;
    getMessageRef(): MessageRef;
    getParsedContent(): Uint8Array | Record<string, unknown> | unknown[];
    static isAESEncrypted(msg: StreamMessage): msg is StreamMessageAESEncrypted;
}
