Proposed DID document metadata property: network
Some DID methods have the concept of a "network", for example "mainnet", "testnet", "staging", etc. This may sometimes be encoded in the DID itself and separated by ":" characters, e.g.:
did:example:network:123456789abcdefghi
There are also DID methods which encode a "network" in a different way as part of the identifier, or not encode it in the identifier itself at all, but still recognize the concept of a "network".
In all those cases, it could be useful to define a reusable DID document metadata property which returns the "network" as part of DID Resolution e.g.:
{
"@context": "https://w3id.org/did-resolution/v1",
"didDocument": {
"@context": "https://www.w3.org/ns/did/v1",
"id": "did:example:network:123456789abcdefghi",
...
},
"didResolutionMetadata": {
"contentType": "application/did"
},
"didDocumentMetadata": {
"network": "testnet"
}
}
This proposal was motivated by a discussion in the DID Resolution repo: https://github.com/w3c/did-resolution/issues/52
I am implementing this right now. A question I have is how to control the acceptable set of strings for a network. Right now it seems that a registry is the best option. But how could that be implemented?
@melvincarvalho I think this would be method-specific, i.e. it's up to you how you want to manage and govern the possible values for this property in your DID method.