Module web

Source
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(): Converts did:web:example.com format to HTTPS well-known URLs
  • query(): Fetches DID documents for did:web identifiers
  • query_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