Values for application logic
Vectors, maps, strings, and scalars are first-class
store-aware values. Every value knows its hash and owning
store. Updates return new values that share unchanged nodes with the old
ones — structural sharing by construction, not convention.
Access is lazy: realize only the subtree you need, which
makes partial sync and incremental fetch natural when data lives across
a network.
Stores for persistence and sync
Content stores are simple immutable maps from hash → node.
Mem, file, and LMDB backends share one protocol; layered, LRU, and remote
stores compose for caching and distribution without changing application code.
A rooted store adds a single mutable root hash on top —
compare-and-set, watches, and push — so peers coordinate on 32 bytes while
the graph underneath stays immutable and cacheable forever.