resolveDidWeb
@mandaitor/sdk / resolveDidWeb
Function: resolveDidWeb()
resolveDidWeb(
did,options?):Promise<DidDocument|null>
Defined in: @mandaitor/sdk/dist/pom-verifier.d.ts:108
Resolves a did:web DID to its DID Document via HTTPS, with SSRF mitigation
that works in BOTH the browser and node:
- enforces
https: - rejects DIDs whose host is a loopback/private/metadata literal
- supports an optional exact-match
allowedDidsallowlist - (node only, best-effort) rejects hosts that DNS-resolve to a private range
did:web:api.mandaitor.io → https://api.mandaitor.io/.well-known/did.json
Returns null for a non-did:web DID, a blocked/disallowed host, or an HTTP
error.
Parameters
did
string
options?
Returns
Promise<DidDocument | null>