Closed csuwildcat closed 3 years ago
can we define the actual interface for what this is proposing?
@kdenhartog @tplooker we need to cite the did core spec sections as the related to "requesting a did document in a specific representation"
and we then need to update the reference implementation to use that approach.
A concrete way to realised this over an HTTP interface is using the Accept header for the client to request the mime-type of the returned did document.
@csuwildcat per our call, we should propose the following language in sidetree spec:
Sidetree did methods MUST support the following representations: [JSON, JSON-LD]. (maybe CBOR later).
Sidetree did methods MUST return the did document in the representation requested.
This prevents Sidetree method implementers from choosing to throw errors when people request JSON/JSON-LD ... and from a practical standpoint, there is a simple transformation between both representations (deleting @context
/ @base
) for JSON only...
However, on the JSON-LD side this also means that Sidetree methods should not return malformed JSON-LD, as has been the case in the past, with the reference implementation....given that the reference implementation supports a limited subset of DID Core functionality, this seems like a very easy property to ensure.
We should probably make it possible to output any supported DID Document format (JSON, JSON-LD, etc.) from the resolution call.