import { IBinary, IEventChainJSON, ISigner } from '../types'; import Event from './Event'; import Binary from '../Binary'; export declare const EVENT_CHAIN_V1 = 65; export declare const EVENT_CHAIN_V2 = 66; export default class EventChain { readonly id: string; readonly networkId: string; events: Array; private partial?; constructor(id: string); constructor(account: ISigner, nonce?: string | Uint8Array); get version(): number; /** @deprecated */ static create(account: ISigner, nonce?: string | Uint8Array): EventChain; createDerivedId(nonce?: string): string; isDerivedId(id: string): boolean; add(eventOrChain: Event | EventChain): EventChain; private addEvent; private addChain; has(event: IBinary | Event): boolean; get latestHash(): Binary; private get initialHash(); private get latestEvent(); get state(): Binary; private get initialState(); protected stateAt(length: number): Binary; protected assertEvent(event: Event): void; validate(): void; private validateEvents; private validateGenesis; isSigned(): boolean; startingWith(start: Binary | Event): EventChain; startingAfter(start: Binary | Event): EventChain; private createPartial; isPartial(): boolean; isCreatedBy(account: ISigner): boolean; get anchorMap(): Array<{ key: Binary; value: Binary; signer: string; }>; toJSON(): IEventChainJSON; static from(data: IEventChainJSON): EventChain; protected static createNonce(input: string | Uint8Array): Uint8Array; protected static getRandomNonce(): Uint8Array; private static buildId; private static validateId; }