import { IBinary, IEventJSON, ISigner, TKeyType } from '../types'; import EventChain from './EventChain'; import Binary from '../Binary'; export default class Event { private version; /** Meta type of the data */ mediaType: string; /** Data of the event */ data: IBinary; /** Time when the event was signed */ timestamp?: number; /** Hash to the previous event */ previous?: IBinary; /** key and its type used to sign the event */ signKey?: { keyType: TKeyType; publicKey: IBinary; }; /** Signature of the event */ signature?: IBinary; /** Hash (see dynamic property) */ private _hash?; /** Hash of attachments related to the event */ readonly attachments: Array<{ name: string; mediaType: string; data: IBinary; }>; constructor(data: any, mediaType?: string, previous?: string | Uint8Array); addAttachment(name: string, data: any, mediaType?: string): void; private _setData; get hash(): Binary; toBinary(): Uint8Array; private toBinaryV1; private toBinaryV2; verifySignature(): boolean; verifyHash(): boolean; signWith(account: ISigner): this; addTo(chain: EventChain): this; isSigned(): boolean; get parsedData(): any; toJSON(): IEventJSON; static from(data: IEventJSON, version?: number): Event; }