Skip to main content

Module did_document

Module did_document 

Source
Expand description

did:web document endpoints (Phase 0c).

Serves DID documents at:

  • GET /.well-known/did.json — root deployment DID (controller for all keys under this issuer’s authority)
  • GET /users/:username/did.json — hard error while path-form account DID minting is frozen (#1159)
  • GET /clients/:client_id/did.json — per-client DID document (for Tier 3 confidential clients with registered keys)

All documents follow the W3C DID Core 1.0 + did:web 1.0 conventions. All key-bearing verification methods use the Multikey type with a multicodec-prefixed publicKeyMultibase (ed25519 z6Mk form; p256 / ML-DSA-65 likewise), matching the atproto #atproto VM and the did:key encoding.

The root document is additionally atproto-compatible (#154): when an ES256 key store is present it carries a P-256 #atproto Multikey, an #atproto_pds service, and alsoKnownAs at://{handle} — the shape existing atproto resolvers expect. Our Ed25519 mesh verification method and any typed transport service entries (IrohTransport/QuicTransport/OnionTransport) are optional, additive, and ignored by atproto (which matches by id/type). P-256 satisfies atproto (it accepts p256/k256); k256 is not used.

The format produced here matches the architecture-doc Subject Identity Format section and is consumed by:

  • Federation peers verifying did:web subjects in tokens
  • Clients that want to discover an issuer’s signing keys without OAuth metadata fetch
  • The Phase 1c private_key_jwt flow’s client-key lookup

Structs§

AtprotoIdentity
The node’s atproto-native identity to embed in the root DID document: the active P-256 signing key plus the account handle. Bounded overlap keys use distinct fragments so stock atproto resolvers continue selecting only the active #atproto method.
AtprotoOverlapKey
A bounded verification-only overlap key. It is never selected for signing.
TransportEndpoint
An optional, additive transport endpoint advertised as a typed service entry (DIDComm-style map). atproto resolvers ignore these; the mesh dial resolves by service.type.

Functions§

at9p_capsule
GET /.well-known/at9p/{cid}.cbor — this node’s live at9p genesis capsule.
atproto_did
GET /.well-known/atproto-did — atproto handle→DID resolution (HTTP method).
atproto_verification_methods
Build the active plus bounded drain/lead VMs used by the producer. The auxiliary fragments are deliberately distinct: upstream resolvers select the first exact #atproto fragment and ignore these entries.
client_did_document
GET /clients/:client_id/did.json — per-client DID document.
root_did_document
GET /.well-known/did.json — root deployment DID document.
user_did_document
GET /users/:username/did.json — frozen path-form account DID endpoint.