Closed domwoe closed 2 years ago
I think the spec is clear -- curious where you think it is not. In that section it says that the data elements are merged into the base DIDDoc template. In that template, both are arrays.
From the viewpoint of a resolver who needs to merge the data structures, I want to be certain what I get.
I agree that the spec is clear about the base DIDDoc template. But the description of the diddocContent is less clear:
If the diddocContent item contains verificationMethod and/or authentication items, process them as follows.
1. The entries MUST NOT have the same id values as those from the [NYM](https://hyperledger.github.io/indy-did-method/#term:nym)-generated DIDDoc. If a matching id is found, exit and return an error.
2. Merge the entries into the respective arrays of DIDDoc.
However, the important point for me is that indy-node will only accept arrays on write.
Got it. So if you have the same thing in the DIDDocContent it has to be an array as well. Sounds good to add that clarification.
@domwoe to add a PR. Code to check that if the verificationMethod
and authentication
are included, they must be arrays. This is in the indy-node code and any resolver.
The current spec is not entirely clear if
authentication
andverificationMethod
items indiddocContent
MUST be arrays or if strings are allowed.The DID core spec says that both MUST be arrays. I think we should either
I'd prefer 1, but good with both.