import type { Batch } from '../../json-crdt-patch/Batch'; import type { IClockVector } from '../../json-crdt-patch'; import type { Printable } from 'tree-dump/lib/types'; import type { JsonCrdtOperation } from '../../json-crdt-patch/operations'; /** * Represents a single operation in a delta group. Conveniently, this is the * same as a JSON CRDT Patch operation, so we can directly apply these to the Model. */ export type DeltaMutator = JsonCrdtOperation; /** * Represents a *Delta Group* - a missing state fragment that can be applied to * a CRDT state of another peer to "fill in" the missing state. */ export declare class Delta implements Printable { /** * The *Version Vector* - causal context of the start of the delta. I.e. this * is time boundary what the other peer sends to us, this is what the other * peer has already incorporated into their state. */ readonly vv0: IClockVector; /** * The *Version Vector* - causal context of the end of the delta. I.e. this * is what the delta incorporates up to. This is what peer 2 replies with. */ readonly vv1: IClockVector; /** * A list of *Delta Mutators* (operations) in this *Delta Group*. MUST be * applied in order. */ readonly batch: Batch; static from(data: Uint8Array): Delta; meta: unknown; constructor( /** * The *Version Vector* - causal context of the start of the delta. I.e. this * is time boundary what the other peer sends to us, this is what the other * peer has already incorporated into their state. */ vv0: IClockVector, /** * The *Version Vector* - causal context of the end of the delta. I.e. this * is what the delta incorporates up to. This is what peer 2 replies with. */ vv1: IClockVector, /** * A list of *Delta Mutators* (operations) in this *Delta Group*. MUST be * applied in order. */ batch: Batch); toBinary(): Uint8Array; /** * Returns a textual human-readable representation of the delta. This can be * used for debugging purposes. * * @param tab Start string for each line. * @returns Text representation of the delta. */ toString(tab?: string): string; } //# sourceMappingURL=Delta.d.ts.map