Closed Jsyro closed 1 year ago
According to the DID Core specification, the controller
property of verification methods MUST be a string that conforms to the DID Syntax.
When the DID Peer specification allows for #id for the controller, I believe this was intended for use in the "genesis variant" of the DID Doc structure used in method 1 (an unfortunate amount of the DID peer spec has not been updated since the addition of method 2). This "genesis variant" is not the final form of the document; when resolved, the DID Document should correctly have the DID as the controller and not a DID URL. PyDID models should be used for representing the resolved variant and not the genesis variant; however, my intent with these models was always to make it simple for users to subclass and customize as required. You can create a subclass with the Union[DID, DIDUrl]
for controller and use this to represent the genesis variant of the doc.
Discussed out of band as well and we agree that this PR can be closed.
https://identity.foundation/peer-did-method-spec/#generation-method
This spec specifically allows for
#id
to be an acceptable value for a controller and act as a reference to the DIDDocument ID without needing to populate it with the full value.