Snapshot
The complete state of a resource in one signed blob, for kinds whose edits replace the whole value, with a schema and a causal link to what it builds on.
Fetching schema…

Part of Stem. This page defines the Snapshot blob, the second state representation beside the Change graph.

A Snapshot is one signed value, typed by a schema, that is the whole state of a resource at a point in its history.

Fields

The schema extends blob.

field

type

required

meaning

type

literal Snapshot

yes

Blob type tag.

schema

hm URL

yes

The schema the value conforms to, normally the schema of the resource's Kind.

prev

list of CID

no

The Snapshot or Change blobs this state builds on, sorted by CID. Omitted on the first snapshot.

value

any

yes

The complete state.

Rules

A Snapshot is reached only through a Node whose target is snapshot. The peer validates value against schema, strictly for the kinds Stem ships and advisory for user-defined kinds, and refuses a Snapshot whose schema is not the kind's schema or an extension of it. prev gives causal order: a Snapshot that lists another is newer than it. A Snapshot may list Changes in prev, which is how a document can be compacted into a snapshot, and a Change may list a Snapshot in deps, which is how editing continues from it. Retention follows the kind: latest lets a peer drop superseded snapshots once no Node, link or version pin reaches them. References inside the value (node references, ipfs:// URLs, hm:// URLs) become links according to the kind's link rules. A Snapshot carries no visibility: its audience is its node's.

Today (HM24)

Comment, Contact and Profile are each a separate blob type with a replace-the-whole-value edit model, a TSID or key identity and their own index code. Stem expresses all three as Snapshot-backed kinds and gains schemas, kinds, files and policies for free.

Example

A comment's snapshot:

{ "type": "Snapshot", "signer": {"/": {"bytes": "7QEE...Commenter"}}, "sig": {"/": {"bytes": "..."}}, "ts": 1759910520000, "schema": "hm://z6MkiAKDcRSzQ4zPZfnJcS5HYx5MwgN6MU9foHihJGrhqNBj/stem/kinds/comment/value", "value": { "target": {"space": {"/": {"bytes": "7QEE...Starlight"}}, "node": "bafyreiujzdegxdncf32epf3dhodzdocis2jhtlgmxgedn73u55xtplpft7", "version": "bafyreib3nq5mkq2w7e4w3slkz2n7m7xq6x4hw4x2x3vl6tz2cmkfnq5a3e"}, "body": [{"id": "b1", "type": "Paragraph", "text": "Should the roadmap mention groups?"}] } }

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime