Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification method controller property when working with intermediate DID document representations #866

Open
wip-abramson opened this issue Oct 21, 2024 · 2 comments
Labels
question Further information is requested

Comments

@wip-abramson
Copy link

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.

@peacekeeper peacekeeper added the question Further information is requested label Oct 25, 2024
@peacekeeper
Copy link
Contributor

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.

@wip-abramson
Copy link
Author

Interesting, so the pattern should be.

  1. Construct the intermediate DID document (Without the DID identifier)
  2. Generate the DID identifier
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants