import { StreamID, StreamPartID, UserID } from '@streamr/utils';
import { EncryptedGroupKey } from './EncryptedGroupKey';
import { MessageID } from './MessageID';
import { MessageRef } from './MessageRef';
export declare enum StreamMessageType {
    MESSAGE = 27,
    GROUP_KEY_REQUEST = 28,
    GROUP_KEY_RESPONSE = 29
}
export declare enum ContentType {
    JSON = 0,
    BINARY = 1
}
export declare enum EncryptionType {
    NONE = 0,
    AES = 2
}
export declare enum SignatureType {
    LEGACY_SECP256K1 = 0,// Brubeck payload signed with secp256k1 curve
    SECP256K1 = 1,// Streamr 1.0 payload signed with secp256k1 curve
    ERC_1271 = 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;
};
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;
}
