TBD54566975 / web5-js

Monorepo for the Web5 JS TypeScript implementation
https://tbd54566975.github.io/web5-js/
Apache License 2.0
135 stars 56 forks source link

Update DID resolver `contentMetadata` to return `{}` #516

Open kirahsapong opened 6 months ago

kirahsapong commented 6 months ago

From @AlexHsieh in this comment:

Also at reading web5-js, found out that this line

contentMetadata : didResolutionMetadata

should be

contentMetadata : didDocumentMetadata

Someone might help check ? thanks

kirahsapong commented 5 months ago

Update on the above: contentMetadata should be an empty metadata structure {} per the spec:

contentMetadata If the dereferencing is successful, this MUST be a metadata structure, but the structure MAY be empty. This structure contains metadata about the contentStream. If the contentStream is a DID document, this MUST be a didDocumentMetadata structure as described in DID Resolution. If the dereferencing is unsuccessful, this output MUST be an empty metadata structure.

Good catch @frankhinek and @AlexHsieh!