Expand description
§Web DID Client
HTTP client for resolving did:web identifiers by converting DID formats to HTTPS URLs
and fetching DID documents from well-known locations. Supports both standard did:web
resolution and direct hostname-based document retrieval.
§Key Functions
did_web_to_url(): Convertsdid:web:example.comformat to HTTPS well-known URLsquery(): Fetches DID documents for did:web identifiersquery_hostname(): Direct document retrieval from hostname well-known endpoints
§URL Conversion
Transforms DIDs like did:web:example.com:path:subpath into HTTPS URLs following
the did:web specification for well-known document locations.
Functions§
- did_
web_ to_ url - Converts a did:web DID to its corresponding HTTPS URL. Transforms DID format to the expected well-known document location.
- query
- Queries a did:web DID document from its hosting location. Resolves the DID to HTTPS URL and fetches the JSON document.
- query_
hostname - Queries a DID document directly from a hostname’s well-known location. Fetches from https://{hostname}/.well-known/did.json