RecordWeb Protocol (RWP) · Quick'n'Dirty

What an RWP record really is - and how it gets resolved.

Seven building blocks: from a record's identity through its content and integrity guarantees, to the resolution infrastructure that turns a DID into a reachable record.

1 Identity The DID

Every record has a stable, decentralized identity. The namespace points to an organization/infrastructure; the record-id is unique within that namespace. Optional segments address specific versions or representations.

// DID structure did:rec:<namespace>:<record-id> [:<versionHash>][:<contentHash>] // Example did:rec:5264d2c3-…:f47ac10b-…
2 Container The Record

The record itself is a lean envelope: a DID for identification, a payload holding the content lifecycle, metadata for classification, and a hash that cryptographically binds all three together.

{ "did": "did:rec:5264d2c3-…:f47ac10b-…", "payload": [], "metadata": {}, "recordHash": "sha256:9f8e7d…" }
3 Content Payload

The payload is a list of version snapshots (draft → finalized), each with parent references, a signature, and one or more representations - the actual content in different formats, either inline or by reference.

{ "payload": [{ "versionHash": "sha256:eef9dd…", "state": "finalized", "parents": ["sha256:6ce834…"], "signature": "z3FttV7…", "representations": [ { "format": "text/markdown", "content": "sample text", "contentHash": "sha256:3a84b2…", "primary": true, "role": "source" }, { "format": "application/pdf;…", "ref": "sample reference", "primary": false, "role": "publication" } ]}]}
4 Classification Metadata

Three layers: core (record type and schema version, each themselves referenceable RWP records), governance (owner, classification, retention, tags), and optional extensions for domain-specific fields.

{ "metadata": { "core": { "recordType": "did:rec:2fe146…:5264d2…", "schemaVersion": "sha256:a665a4…" }, "governance": { "owner": "did:rec:bern.ch:unit-baubewilligung", "classification": "internal", "retentionPolicy": "did:rec:bern.ch:retention-bauakten-30y", "tags": ["building-permit", "parcel-451"] }, "extensions": [] }}
5 Integrity recordHash

The hash cryptographically binds did, payload, and metadata - any change to any of the three fields changes the hash. versionHash and contentHash are computed analogously, over the respective version or representation fields.

// Canonical JSON (RFC 8785) + SHA-256 recordHash = SHA-256( canonicalize({did, payload, metadata}) ) // analogous for individual snapshots // and representations
6 Resolution DID Document

Every DID resolves to a DID document containing a recordEndpoint (the fixed URL at which the actual record is served) plus administrative details such as controller and verification methods.

{ "id": "did:rec:5264d2c3-…:f47ac10b-…", "recordEndpoint": "https://records.bern.ch/api/v1/…", "currentVersion": "sha256:e3b0c4…", "controller": "did:rec:bern.ch:controller-001" }
7 Resolution Global Namespace Registry

The namespace itself is registered centrally (DLT-backed) in the GNR and points to the resolverEndpoint, the organization responsible for serving DID documents for every record in that namespace.

{ "docType": "namespaceRecord", "namespace": "5264d2c3-…", "resolverEndpoint": "https://vps.recordweb.dev/resolver/…", "registeredBy": "SwissGovOrgMSP", "endorsedBy": ["SwissGovOrgMSP"] }

Sequence

1DID
2Record
3Payload
4Metadata
5recordHash
6DID Document
7GNR
Note on privacy & security. RWP deliberately makes no provisions for access control, encryption, privacy, or other security measures. Resolvers, GNR operators, and applications must implement these themselves, in line with their own legal and organizational requirements.
Step 1 / 8