w3c / did-core

W3C Decentralized Identifier Specification v1.0
https://www.w3.org/TR/did-core/
Other
395 stars 93 forks source link

What is the relationship of didDocumentStream and didDocument? #803

Open ekr opened 2 years ago

ekr commented 2 years ago

Reading 7.1, I don't see any requirement that didDocument and didDcoumentStream be semantically equivalent.

Do they have to be? If so, who is responsible for enforcing this? If not, what are the implications?

peacekeeper commented 2 years ago

@ekr sorry for the late reply..

Reading that section you referenced:

The resolve function returns the DID document in its abstract form (a map). The resolveRepresentation function returns a byte stream of the DID Document formatted in the corresponding representation.

To me it seems sufficiently clear that given the same DID, the resulting didDocument or didDocumentStream are "semantically equivalent", the difference is that one is considered the "abstract data model", whereas the other one is a concrete representation of the DID document such as JSON-LD or JSON or CBOR. I think the diagram below also reenforces this view about the relationship between the two.

Does this answer your question, or do you maybe have a suggestion how we could clarify this better?