getDocumentUrl

open override fun getDocumentUrl(did: String): String

Transforms a did:web identifier into its DID document URL per the W3C spec:

  • did:web:example.com → https://example.com/.well-known/did.json

  • did:web:example.com:user:alice → https://example.com/user/alice/did.json

  • did:web:example.com%3A8080:user → https://example.com:8080/user/did.json

The /.well-known/ location applies ONLY to bare-domain DIDs; path-based DIDs use {path}/did.json. Method-specific-id segments are percent-decoded before URL construction, which is how ports are expressed (%3A → :).