Spec currently reads, "A DID Document should be created at did/repo.did and ..."
In the "Peer DIDs" workshop at IIW one participant talked about their method of creating a DID that might apply here: they create a DID Document Template with the "id" field having a $me placeholder. Then they hash the DID Document to generate the DID itself, and the DID Document is dynamically generated from the "DID Document Template".
I think that's almost precisely what we want here, except that the placeholder is the $commit.
So I suggest a did/repo.did that is actually a DID Document Template, and looks like this:
{
"@context": "https://wsid.org/git-method/v1",
"id": "did:git:$commit",
"service": [{
"type": <gitService>,
"serviceEndpoint": <Canonical URI for the respository>
}],
"authentication": [
"<hash-of-pub-key>#controller-1",
"<hash-of-pub-key>#controller-2",
"<hash-of-pub-key>#controller-n"
]
}
Note that it may be fine to call the template a "DID Document" in a generally conversational context, but when we're writing the spec it may be helpful to differentiate the "template" (checked in) from the "document itself" (dynamically generated).
Spec currently reads, "A DID Document should be created at
did/repo.didand ..."In the "Peer DIDs" workshop at IIW one participant talked about their method of creating a DID that might apply here: they create a DID Document Template with the "id" field having a
$meplaceholder. Then they hash the DID Document to generate the DID itself, and the DID Document is dynamically generated from the "DID Document Template".I think that's almost precisely what we want here, except that the placeholder is the
$commit.So I suggest a
did/repo.didthat is actually a DID Document Template, and looks like this:Note that it may be fine to call the template a "DID Document" in a generally conversational context, but when we're writing the spec it may be helpful to differentiate the "template" (checked in) from the "document itself" (dynamically generated).