Expand description
DID URL parsing and dereferencing.
A DID URL is a DID plus optional path, query, and/or fragment components, per W3C DID Core §3.2:
did-url = did path-abempty [ "?" query ] [ "#" fragment ]
path-abempty = *( "/" segment )Examples:
did:ndn:BwkI...#key-0— fragment reference to a verification methoddid:ndn:BwMg...#key-agreement-1— zone DID key agreement VMdid:ndn:BwkI.../service?type=ndn#endpoint— service lookup
(The method-specific identifier is base64url — no colons.)
§Dereferencing
deref_did_url takes a parsed DID URL and a resolved DidDocument
and returns the specific resource the URL identifies — a verification
method, a service, or the full document (when no fragment).
Structs§
- DidUrl
- A parsed DID URL (DID + optional path, query, fragment).
Enums§
- Dereferenced
Resource - The resource identified by a dereferenced DID URL.
Functions§
- deref_
did_ url - Dereference a DID URL against an already-resolved DID Document.
- deref_
did_ url_ or_ document - Convenience: dereference without a fragment, returning the document.