Expand description
did:web4 — the W3C DID interop face of an LCT.
Projects an LCT into a conformant DID Document (identifier + keys +
endpoints) so the existing DID / VC / EUDI ecosystem can resolve a Web4
entity. The DID Document is a lossy view — the identifier-and-keys slice;
Web4’s trust/relationship layer (T3/V3, MRH, witnessing, ATP) has no DID
representation by design and is reached only via the Web4Hub service.
Design note: docs/designs/did-web4-mapping.md. This module is generic and
public-eligible — it exposes only what DID standardizes; no novel mechanism.
Identifier syntax: did:web4:<authority>:<lct-uuid>, where <authority> is
the resolving hub host. Resolution returns a hub-signed pubkey binding,
making did:web4 resolution attested (vs did:web’s TLS-only trust).
Structs§
- DidDocument
- A W3C DID Core 1.0 conformant DID Document — the public projection of an LCT.
- DidDocument
Metadata - DID document metadata — carries deactivation, per the DID Resolution spec.
- Service
- Service
Endpoints - Optional service endpoints to advertise in the DID Document.
- Verification
Method
Functions§
- did_
web4 - Build a
did:web4identifier string. - ed25519_
multikey - Encode a 32-byte Ed25519 public key as a
MultikeypublicKeyMultibasestring: multicodeced25519-pub(0xed 0x01) + key, base58btc, ‘z’ prefix. Yields the standardz6Mk...form. - parse_
did_ web4 - Parse a
did:web4:<authority>:<uuid>identifier into its parts.