Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Documents

A document is the basic unit of mutable data in The Wired: a map from keys to content, in contrast to a blob’s fixed bytes. Writing to a key appends a signed entry, and readers see the most recent.

A document is identified by a keypair generated when it is created: the public half is its ID, the secret half is the right to write to it.

Capabilities

Access to a document is a matter of which key you hold, not of a list someone maintains on your behalf.

  • Holding a document’s ID lets you read it and sync it.
  • Holding its secret lets you write to it.

Sharing access means sharing a key. A document is private because its ID was never given out, not because a server was asked to keep others away. There is no permission list for a host to misread, leak, or ignore, and no way to grant access it was never given.

Revoking access means rotating: create a new document, move the content, and stop publishing the old ID. Anyone who already read the old contents keeps them, but sees nothing further.

Verification

Every entry is signed by the document’s key and by the key of the device that wrote it. Device keys are bound to a DID, tracing an entry to the person who wrote it.

You can verify data without trusting whoever handed it to you. A store relaying a document cannot alter an entry, insert one, or attribute it to a different author; the worst it can do is withhold the newest version or refuse to talk.

Collaborative Editing

Documents merge rather than collide. Each entry carries its author and a timestamp; concurrent writes to different keys all survive, and concurrent writes to the same key settle on the latest. That rule is deterministic, so every peer converges on the same result regardless of arrival order, and editing offline never needs a conflict resolved on reconnect.

The rule governs structure as directly as it governs file content. An HSD scene is a document with every object and property as a key, so two people moving different objects write different keys and both edits survive, by this rule and nothing more.

Between saves, a live session keeps everyone’s view of a scene in step. Seeing a change and storing one are separate decisions.

Format

An entry is (document, author, key) → (hash, size, timestamp), signed by both the document’s key and the author’s device key. The hash addresses the entry’s content in the blob layer; the timestamp orders concurrent writes to the same key.