Expand description
DID-document transport service-entry codec.
The canonical encoder/decoder for the typed transport entries a node
publishes in its DID document, shared by the producer (the did:web document
builder) and the consumer (the DID resolver that feeds crate::dial::dial).
§Layering (settled design)
Peer identity is established at the application layer — the response
SignedEnvelope is verified against the node’s published keys (the #mesh
verification method / JWKS). The transport entries here carry reach info +
channel mechanics, not the identity root. An iroh nodeId is an endpoint
address and must not manufacture identity or key authority (#1031).
§Wire shape
serviceEndpoint is a DIDComm-style map (W3C DID Core §5.4 permits a map).
Binary values use multibase (z = base58btc) over a multiformats prefix,
matching the doc’s Multikey publicKeyMultibase encoding (#280; ed25519
VMs were formerly Ed25519VerificationKey2020):
// type: "IrohTransport"
{ "nodeId": "z<multicodec ed25519-pub || key>", "relays": ["https://…"], "accept": ["hyprstream-rpc/1","moql"] }
// type: "QuicTransport"
{ "uri": "https://host:port", "webpki": false,
"certHashes": ["z<multihash sha2-256 || digest>"], "accept": [...] }certHashes is a multibase-encoded multihash (self-describing algorithm,
sha2-256 = 0x12), a set so cert rotation can overlap. Whole-cert pins
are the browser-compatible projection of the identity key — see #185 / #200.
Structs§
- Browser
Quic Reach - Browser projection of the primary live QUIC reach.
- Decoded
Entry - A decoded transport entry containing only dialable reach information.
Functions§
- decode_
browser_ quic_ reach - Validate a live
QuicTransportservice entry and project its certificate pin into the singular browser registration shape. - decode_
service_ entry - Decode one DID-doc transport
serviceentry ({type, serviceEndpoint}) into a dialableDecodedEntry. Unknowntypes error so the caller can skip them. - encode_
iroh - Encode an
IrohTransportserviceEndpointmap for a peer identified bynode_id(its Ed25519EndpointId), reachable viarelays. - encode_
quic - Encode a
QuicTransportserviceEndpointmap.