diff --git a/index.html b/index.html index 53d42641..35ed4d42 100644 --- a/index.html +++ b/index.html @@ -2687,13 +2687,191 @@

This section defines the inputs and outputs of the DID resolution and DID URL dereferencing processes. The exact implementation of these functions is out of scope for this specification, but some considerations for -implementors are available in [[?DID-RESOLUTION]]. +implementors are discussed in [[?DID-RESOLUTION]]. +

+ +

+All conformant DID resolvers MUST implement the DID resolution function +for at least one DID method and MUST be able to return a DID document in +at least one conformant representation.

DID Resolution

+

+The DID resolution function resolves a DID into a DID document +by using the "Read" operation of the applicable DID method. (See .) +The details of how this process is accomplished are outside the scope of this +specification, but all conformant implementations MUST implement a function in the following form: +

+ +

+resolve ( did, did-resolution-input-metadata )
+     -> ( did-resolution-metadata, did-document-stream, did-document-metadata ) +

+ +

+The input variables of this function MUST be as follows: +

+ +
+
+did +
+
+A conformant DID as a single string. This is the DID to resolve. +This input is REQUIRED. +
+
+did-resolution-input-metadata +
+
+A metadata structure consisting of input options to the resolve +function in addition to the did itself. +Properties defined by this specification are in . +This input is REQUIRED, but the structure MAY be empty. +
+
+ +

+The output variables of this function MUST be as follows: +

+ +
+
+did-resolution-metadata +
+
+A metadata structure consisting of values relating to the results of the DID resolution process. +This structure is REQUIRED and MUST NOT be empty. +This metadata typically changes between invocations of the resolve function as it represents data about the resolution process itself. +Properties defined by this specification are in . +If the resolution is successful, this structure MUST contain a content-type property containing the mime-type representation of the did-document-stream in this result. +If the resolution is not successful, this structure MUST contain an error property describing the error. +
+
+did-document-stream +
+
+If the resolution is successful, this MUST be a byte stream of the resolved DID document in a single conformant representation. +The byte stream MAY then be parsed by the caller of the resolve function into a DID document abstract data model, which +can in turn be validated and processed. +If the resolution is unsuccessful, this value MUST be an empty stream. +
+
+did-document-metadata +
+
+If the resolution is successful, this MUST be a metadata structure. +This structure contains metadata about the DID document contained in the did-document-stream. +This metadata typically does not change between invocations of the resolve function unless +the DID document changes, as it represents data about the DID document. +If the resolution is unsuccessful, this output MUST be an empty metadata structure. +Properties defined by this specification are in . +
+
+ +

+DID resolver implementations MUST NOT alter the signature of this function in any way. DID resolver +implementations MAY map the resolve function to a method-specific internal function to perform the +actual DID resolution process. DID resolver implementations DID resolver implementations MAY implement +and expose additional functions with different signatures in addition to the resolve function specified here. +

+ +
+

+DID Resolution Input Metadata Properties +

+ +

+The possible properties within this structure and their possible values are defined by [[DID-CORE-REGISTRIES]]. +This specification defines the following common properties. +

+ +
+
+accept +
+
+The MIME type of the caller's preferred representation of the DID document. The DID resolver implementation +MAY use this value to determine the representation contained in the returned did-document-stream if such +a representation is supported and available. This property is OPTIONAL. +
+
+
+ +
+

+DID Resolution Metadata Properties +

+ +

+The possible properties within this structure and their possible values are defined by [[DID-CORE-REGISTRIES]]. +This specification defines the following common properties. +

+ +
+
+content-type +
+
+The mime-type of the returned conformant representation of the contained in the returned did-document-stream. +This property is REQUIRED if resolution is successful and a did-document-stream is returned. +The caller of the resolve function MUST use this value when determining how to +parse and process the did-document-stream returned by this function into a +DID document abstract data model. +
+
+error +
+
+The error code from the resolution process. +This property is REQUIRED when there is an error in the resolution process. +The value of this property is a single keyword string. +The possible property values of this field are defined by the DID Core Registry [[DID-CORE-REGISTRY]]. +This specification defines the following error values: +
+
+invalid-did +
+
+The DID supplied to the DID resolution function does not +conform to valid syntax. (See .) +
+
+unauthorized +
+
+The caller is not authorized to resolve this DID with +this DID resolver. +
+
+not-found +
+
+The DID resolver was unable to return the DID document +resulting from this resolution request. +
+
+
+
+ +
+ +
+

+DID Document Metadata Properties +

+ +

+The possible properties within this structure and their possible values are defined by [[DID-CORE-REGISTRIES]]. +This specification defines the following common properties. +

+ +
+
@@ -2706,6 +2884,31 @@

Metadata Structure

+ +

+A metadata structure is a common and interoperable data structure used to +communicate information alongside a DID and DID document, and is specifically +used for the DID resolution function definition in this specification. +Use of a metadata structure is intended to compliment the information available +within a DID or DID document, and therefore is best suited to carrying +metadata as an input or output to the function process. +

+ +

+A metadata structure consists of a set of properties. +Each property has a single name and a single value. +The name of the property MUST be a single string. +Property names MUST be unique within a given set. +Each property name MUST map unambiguously to a single value within the set. +Property names MUST be compared by the exact byte value. +The value of a property MUST be a single string. +The value of a property MAY be an empty string. +Properties with null or equivalent values MUST be treated as +equivalent to omitted properties within a given set. +Property values MAY be repeated under different property names within a given set. +Property definitions MAY impose additional constraints on the property value, so long as +those constraints allow for unambiguous representation as a single string. +