Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Key changes
This release addresses feedback regarding the current state that dealing with DID-Linked Resources (DLR) typically requires two API calls:
This release allows, for certain
Accept
header profiles, for both the DLR and its metadata to be fetched in a single call. We've also maintained backwards compatibility with current behaviour when no specific header is provided or DID Documents/DLRs fetched in the browser.Supporting more granular ways of fetching DID Documents and DID-Linked Resources will offer developers greater control when fetching resolution/dereferencing results.
For DID Resolution
Accept: application/ld+json;profile="https://w3id.org/did-resolution"
: Returns DID Document + DID Document metadata with DID-Linked Resource metadataAccept: application/did+json
,application/did
, orapplication/did+ld+json
: Returns DID Document only, no DID Document metadataAccept: */*
or accessing via browser: → Returns DID Document + DID Document metadata with DID-Linked Resource metadataresourceMetadata=false
: Returns DID Document + DID Document metadata without DID-Linked Resource metadataFor DID URL Dereferencing
Accept: application/ld+json;profile="https://w3id.org/did-url-dereferencing"
: Returns DID-Linked Resource (Base64-encoded) and its metadata in a single responseAccept: */*
, specific Accept header (e.g.,Accept: application/json
), or accessing via browser: Keeps existing behaviour, returning only the DID-Linked ResourceGeneral improvements
Accept
header, you can now useq
values to prioritise preferred IANA media types in response and this will be respected.invalidDidUrl
error is now thrown instead of attempting to resolve to first matching DID-Linked ResourcecontentMetadata
rather thancontentStream
. Only the actual DID-Linked Resource, if requested in body in Base64-encoding, is returned incontentStream
Full changelog
https://github.com/cheqd/did-resolver/releases/tag/v3.7.0