Expand description
did:web → dialable TransportConfig resolution (#279).
The mesh’s only live crate::resolver::Resolver is the
crate::registry::EndpointRegistry (service-name → local endpoint). This
module adds the federated reach path: a DidWebResolver that turns a
did:web identifier into one-or-more dialable TransportConfigs by
fetching the subject’s DID document and decoding its typed transport
service entries.
§Layering
- DID → URL (
did_web_to_url) — pure, per the did:web spec. - DID-doc → reach (
transport_entries/preferred_transport) — reusescrate::service_entry::decode_service_entry(the canonical transport codec; this module never re-implements transport decoding) and applies a deterministic preference order. - Fetch + cache (
DidDocFetcher) — abstracted behind a trait so the parse/decode path is testable with an injected fixture (no live network). The native HTTPS implementation lives inHttpDidDocFetcher(TTL-cached, mirroring the JWKS fetch+cache posture inFederationKeyResolver).
§Scope (#279)
Transport reach only. Peer identity anchoring (#mesh ML-DSA, the
PQ trust store) is #157/#154/#137 (already landed) and is NOT done here.
did:key resolution is #281 (a later ticket); only did:web here.
Structs§
- Chained
Resolver - Composes a primary resolver with a fallback: tries
primaryfirst, and on error falls back tofallback. - DidWeb
Resolver - A
Resolverthat turns adid:webidentifier into a dialableTransportConfig. - Http
DidDoc Fetcher - Native HTTPS DID-document fetcher with a TTL cache.
Constants§
- MULTICODEC_
ML_ DSA_ 65_ PUB - Multicodec
ml-dsa-65-pubunsigned-varint prefix (0x1211→ bytes0x91 0x24).
Traits§
- DidDoc
Fetcher - Fetches a DID document (parsed JSON) for a resolved HTTPS URL.
Functions§
- decode_
ed25519_ multikey - Decode a
MultikeypublicKeyMultibasestring into raw Ed25519 key bytes. - decode_
multikey - Decode a
MultikeypublicKeyMultibasestring into raw key bytes, verifying the base58btc multibase prefix (z) and the expected multicodec header. - did_
key_ to_ ed25519 - Decode a
did:key(Ed25519) identifier into its raw 32-byte Ed25519 key. - did_
web_ to_ url - Derive the HTTPS DID-document URL for a
did:webidentifier, per the did:web spec (https://w3c-ccg.github.io/did-method-web/#read-resolve). - ed25519_
to_ did_ key - Encode a raw 32-byte Ed25519 public key as a
did:key(Ed25519) identifier (did:key:z6Mk…). - install_
chained - Install a
DidWebResolveras the global resolver, chained in front of the existing global resolver (typically the registry) so local service-name lookups still resolve. - is_
did_ key - Whether
didis adid:keyidentifier (the self-certifying interop arm). - jwks_
ed25519_ keys - Extract every Ed25519 public key from a JWKS document (RFC 7517), decoded to raw 32-byte keys (#137 stage 2, JWKS fallback path).
- mesh_
kem_ recipient - Extract the
#mesh-kemhybrid-KEM recipient public from a DID document’skeyAgreementrelationship (#1137 remote-node bootstrap). - preferred_
transport - The single most-preferred transport
TransportConfigfrom a DID document, optionally constrained to aSocketKind. - transport_
entries - Decode all typed transport
serviceentries from a DID document into dialableDecodedEntrys, in preference order. - verification_
method_ ed25519_ keys - Extract every Ed25519 public key published in a DID document’s
verificationMethodarray, decoded to raw 32-byte keys (#137 stage 2). - verification_
method_ ml_ dsa_ 65_ keys - Extract every ML-DSA-65 verifying key published in a DID document’s
verificationMethodarray (#579 multi-alg VM extraction).