Skip to content

LedgerRecord

type LedgerRecord = {
id: string;
lamport: number;
meta?: TransactionMeta;
ops: TransactionOp[];
seq?: number;
source?: string;
timestamp: number;
touches: RecordTouch[];
};

Defined in: ledger.ts:23

A flat, JSON-serializable snapshot of one committed transaction.

PropertyTypeDescriptionDefined in
idstringStable unique id — the dedupe/diff key across ledgers.ledger.ts:25
lamportnumberLogical (Lamport) clock for deterministic causal ordering and tie-breaking.ledger.ts:31
meta?TransactionMetaCarried-through transaction metadata (e.g. nextSelection). Best-effort serializable.ledger.ts:37
opsTransactionOp[]The transaction’s operations, deep-cloned so the record is self-contained.ledger.ts:27
seq?numberPer-source monotonic counter. Powers version vectors for delta sync; optional.ledger.ts:35
source?stringOrigin of the edit (client/editor/site id), if known.ledger.ts:33
timestampnumberWall-clock time of authoring (ms since epoch). Primary chronological key.ledger.ts:29
touchesRecordTouch[]Id-keyed conflict surface, resolved against the base doc at record time.ledger.ts:39