Extends
args.| type Blob type tag, always `Change`. | Change | optional |
| signer Public key of the account or device that signed the blob. | inherited | |
| sig Signature over the canonical DAG-CBOR of the blob with `sig` set to 64 zero bytes. | inherited | |
| ts When the signer says the blob was made, in Unix milliseconds; not checked against real time. | inherited | |
| genesis CID of the document's first Change, which is its identity; omitted on the genesis Change itself. | optional | |
| deps CIDs of the head Changes the author built on, sorted by CID; omitted on the genesis Change. | of | optional |
| depth One more than the deepest dependency's depth; omitted on the genesis Change. | optional | |
| body The operations this Change applies to the document's content and metadata. | ⟨Block = ⟨Block⟩⟩ | optional |
A Change is the unit of editing in Hypermedia: one signed step in a document's history. Each Change says which earlier Changes it builds on and lists the operations that turn that state into the new one. Replaying a document's Changes in dependency order, on any machine, produces the same document. Every Change is signed, so the author of every step is known.
This page defines the change blob type, a Hypermedia network blob that extends the signed blob envelope. Its formal schema is attached as the schemaDefinition in this document's metadata, so the app can show it and sign values of this type.
genesis names the document's first Change, which is the document's identity. deps are the heads the author saw, sorted by CID. depth is one more than the deepest dependency. body holds the operations. The genesis Change of an ordinary document is its first content Change, and it carries none of genesis, deps or depth. The daemon rejects a Change that has some but not all of the three. At replay it requires that every dependency was applied first with a smaller timestamp and depth. The home document of a space is the one exception to "the first content Change is the genesis": its genesis is an empty Change with ts: 0, deterministic for the account key.
A Change alone does not change what readers see. A Ref that points at the head Changes asserts the document's current state at an address. A Change that no Ref reaches is a proposal, and that is how branches and open editing work. Documents has the rules for ordering concurrent Changes, producing minimal Changes from an edit, and merging heads.
See also
Documents: the change graph, op ids, the CRDT rules, versions and merging.
Signed Blobs: the envelope and CIDs.
change/body and change/op: the operations.
Seed API: ListChanges lists a document's Changes.
ref: the blob that points an address at a Change's heads.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime