...
The aim of this specification is to create a more resilient, tamper-resistant, highly available and standardized way of storing, referencing and retrieving resources (such as data schemas, interface definitions, governance or policy definitions), using DID URLs to identify resources written directly to a Verifiable Data Registry.
On-ledger Resources identifiable via DID URLs
...
- The DID document is not retrieved by the resolver as part of the dereferencing process. Rather the resolver makes a call to the VDR with the DID URL including a
resource
parameter conformant with this specification. The VDR then follows the specification of the associated DID method to retrieve the identified digital resource and return that resource to the resolver directly. - The resource is still associated with a DID Document. A DID URL that includes the
resource
parameter does still have an associated DID document like any other DID. However if the DID URL includes theresource
parameter, the associated DID document is not involved in the combined resolution/dereferencing step to fetch the resource specified. If the DID alone is resolved (without theresource
parameter), it will still return the associated DID document.- If the DID document contains only an
id
property (whose value must be the DID) and no verification methods, then the DID document cannot be updated and the identified digital resource is a static resource that cannot be versioned. - If the DID document contains one or more verification methods, the same verification methods may be used for authenticating/versioning/updating the identified digital resource and/or the DID document.
- If the DID document contains only an
- The DID Document contains metadata about refers to the associated resource . Via via linked resource metadata. Through associating the resource with a DID Document, the DID Document may generate associated metadata about the resource, defined further below.
...
Parameter | Type | Example |
---|---|---|
"resourceId" | String | did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceId=0f964a80-5d18-4867-83e3-b47f5a756f02 |
"resourceName" | String | did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw |
"resourceType" | String | did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw&resourceType=JSONSchema2020 |
"resourceVersionId" | String | did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw&resourceVersionId=1.3.1 |
| XML Datetime | did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw&resourceType=JSONSchema2020&versionTime=2015-03-11T05:30:02Z |
"versionId" | String | did:example:46e2af9a-2ea0-4815-999d-730a6778227c?versionId=0f964a80-5d18-4867-83e3-b47f5a756f02 |
"versionAt" | XML Datetime | did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw&resourceType=JSONSchema2020&versionAt=2018-07-19T08:40:00Z |
"resourceMetadata" | Boolean | did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw&resourceType=JSONSchema2020&versionAt=2018-07-19T08:40:00Z&resourceMetadata=true |
...
In these cases, the error messages should follow the Error section in the DID Resolution specification here.
Example | Explanation | Error |
---|---|---|
did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw | There MAY be insufficient information for the VDR to process the request (for example, if there are multiple resource versions of the name degreeLaw, or different resource types of the name degreeLaw). | "notFound ". |
did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw&resourceType=JSONSchema2020&versionTime=2018-07-19T08:40:00Z | The identified resource does not exist at the versionTime. | "notFound ". |
did:example:46e2af9a-2ea0-4815-999d-730a6778227c?resourceName=degreeLaw&resourceType=JSONSchema2020&versionId=2.1.4 | The identified version does not exist. | "notFound ". |
Verifiable Data Registry (VDR) and DID Method Requirements
...
- MUST define:
- A method to write a resource to the VDR resource which is mapped to an associated DID Document
A method to map the individual fields of the resource metadata to the resource parameters listed above.
- A method to reference resources within the associated DID Document:
MAY include in the associated DID document an
alsoKnownAs
property containing at least one value that is a hashlink to the identified digital resource. This provides additional cryptographic verification of the binding between the DID and the identified digital resource. This approach MAY be used when there is ONLY one resource associated with a DID and DID Document.MAY include references to the associated on-ledger resources within the
didDocumentMetadata
property, for example:Code Block language js firstline 1 title Linked Resource Metadata "didDocumentMetadata": { "created": "2022-07-19T08:29:07Z", "versionId": "57543FA1D9C56033BABBFA3A438E0A149E01BBB89E6D666ACE1243455AA6F2BC", "linkedResourceMetadata": [ { "resourceURI": "did:cheqd:mainnet:46e2af9a-2ea0-4815-999d-730a6778227c/resources/0f964a80-5d18-4867-83e3-b47f5a756f02", "resourceCollectionId": "46e2af9a-2ea0-4815-999d-730a6778227c", "resourceId": "0f964a80-5d18-4867-83e3-b47f5a756f02", "resourceName": "DegreeLaw", "resourceType": "CL-Schema", "mediaType": "application/json", "created": "2022-07-19T08:40:00Z", "checksum": "7b2022636f6e74656e74223a202274657374206461746122207d0ae3b0c44298", "previousVersionId": null, // null if no previous version, otherwise, resourceId of previous version "nextVersionId": null, // null if no new version, otherwise, resourceId of new version } ] }
- How the VDR shall determine the default media type for the resource written to the VDR.
- How the VDR shall return the resource in response to a request from a conforming DID resolver.
- Important: If the DID alone is resolved without a
resource
parameter, it MUST return the authoritative DID document as defined in W3C Decentralized Identifiers (DIDs) 1.0. This specification adds no additional requirements to a conforming DID document. To enable this combined resolution/dereferencing behavior, this specification defines multiple new DID URL parameters for retrievingresources
. If a DID method specification supports this specification, and if a DID URL using that method includes a parameter with a valid value, then when a resolver calls the associated VDR using that DID URL, the VDR returns the identified digital resource, or metadata associated with the resource.
Resource fields
Resource Parameter | Requirement | Description |
---|---|---|
"resourceUri" | YES | A string or a map that conforms to the rules of [RFC3986] for URIs which SHOULD directly lead to a location where the resource can be accessed from. For example: |
| NO | A string that conforms to a method specific unique identifier format. For example: |
"resourceId" | NO | A string that conforms to a method specific unique identifier format. For example: |
"resourceName" | YES | A string that uniquely names and identifies a resource. This property, along with the resourceType below, can be used to track version changes within a resource. For example: |
"resourceType" | YES | A string that identifies the type of resource. This property, along with the resourceName above, can be used to track version changes within a resource. Not to be confused with media type. (TBC to add to DID Spec Registries) For example: |
"resourceVersionId" | NO | A string that uniquely identifies the version of the resource provided by the resource creator as a tag. For example: |
"mediaType" | YES | A string that identifies the IANA-registered Media Type for a resource. For example: |
"created" | YES | A JSON String serialized as an XML Datetime normalized to UTC 00:00:00 and without sub-second decimal precision. For example: |
"checksum" | NO | A string that provides a checksum (e.g. SHA256, MD5) for the resource to facilitate data integrity. For example: |
"previousVersionId" | NO | The value of the property MUST be anstring. // This is the previous version of a resource with the same For example: |
"nextVersionId" | NO | null |