Verification method controller property when working with intermediate DID document representations
Opened this issue · 2 comments
A DID method I am working on (did:btc1) supports a method-id
that is an encoding of an intermediate DID document representation. E.g. did:btc:<intermediateDocHash>
.
In these cases, what value should I put in the controller
property of the intermediate representations verificationMethods?
The controller
property is a required field for verificationMethod. I believe this can be a relative URL, but I am not sure what is the appropriate relative URL in this case. Is it just empty quotes? Or is it #id
? Or something else.
Alternatively, I could populate the controller
properties of the verificationMethods in the intermediate DID document representation after generating the DID just as I do with the id
field. But ideally there is a relative URL solution I can use.
It cannot be a relative URL.
See: https://www.w3.org/TR/did-core/#verification-methods
The value of the controller property MUST be a string that conforms to the rules in 3.1 DID Syntax.
So it should be the same DID as in the top-level id
field.
Interesting, so the pattern should be.
- Construct the intermediate DID document (Without the DID identifier)
- Generate the DID identifier
- Fill in necessary fields with the DID:
- didDoc.id = did
- didDoc.verificationMethods[n].controller = did (for all n verificationMethods)
I guess you probably should also check if a verificationMethod already has a controller before setting it aswell. Since people could create intermediate DID documents with controllers for verificationMethods that are intentionally not the DID of the document.