diff --git a/index.html b/index.html index 9f24e75d6..8a58868ff 100644 --- a/index.html +++ b/index.html @@ -144,6 +144,18 @@ -moz-user-select: none; -ms-user-select: none; user-select: none; +} +ol.algorithm { + counter-reset: numsection; + list-style-type: none; +} +ol.algorithm li { + margin: 0.5em 0; +} +ol.algorithm li:before { + font-weight: bold; + counter-increment: numsection; + content: counters(numsection, ".") ") "; } @@ -2645,6 +2657,164 @@

Refreshing

+
+

Rendering

+ +

+The rendering feature might not be included in the final version 2.0 +specification and is thus considered a feature at risk. It is unknown at this +time if there will be enough implementations for the feature. The Working +Group is seeking implementer feedback on whether or not they see this +feature as worth keeping in the final version 2.0 specification. +

+ +

+Rendering hints can be used when the issuer has a specific way that +they want to express a verifiable credential to an observer through +a visual, auditory, or haptic mechanism. For example, an issuer of an +employee badge credential might want to include rich imagery of their corporate +logo and specific placement of employee information in specific areas of the +badge. They might also want to provide an audio read out of the important +aspects of the badge for individuals that have accessibility needs related +to their eyesight. +

+ +
+
render
+
+The value of the render property MUST specify one or +more rendering hints that can be used by software to express the +verifiable credential using a visual, auditory, or haptic mechanism. +Each render value MUST specify its type, for example, +SvgRenderingTemplate2023. The precise contents of each +rendering hint is determined by the specific render type +definition. +
+
+ +
+

SvgRenderingTemplate2023

+ +

+When an issuer desires to specify SVG rendering instructions for a +verifiable credential, they MAY add a `render` property that uses the +data model described below. +

+ + + + + + + + + + + + + + + + + + + + + + +
PropertyDescription
id +A URL that dereferences to an SVG image [[SVG]] with an associated +`image/svg+xml` media type. +
type +The type property MUST be SvgRenderingTemplate2023. +
digestMultibase +An optional multibase-encoded multihash of the SVG image. The multibase value +MUST be `z` and the multihash value MUST be SHA-2 with 256-bits of output +(`0x12`). +

+The Working Group is seeking feedback related to the mechanism used to express +the cryptographic hash of the SVG image. This property is a placeholder for that +discussion and is not meant to imply a final decision related to the way this +will be done if the feature is accepted in the future. +

+
+ +

+The data model shown above is expressed in a verifiable credential +in the example below. +

+ +
+{
+  "@context": [
+    "https://www.w3.org/ns/credentials/v2",
+    "https://www.w3.org/ns/credentials/examples/v2"
+  ],
+  "id": "http://example.edu/credentials/3732",
+  "type": ["VerifiableCredential", "UniversityDegreeCredential"],
+  "issuer": "https://example.edu/issuers/14",
+  "validFrom": "2010-01-01T19:23:24Z",
+  "credentialSubject": {
+    "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
+    "degree": {
+      "type": "BachelorDegree",
+      "name": "Bachelor of Science and Arts"
+    }
+  },
+  "render": [{
+    "id": "https://example.edu/credentials/BachelorDegree.svg",
+    "type": "SvgRenderingTemplate2023",
+    "digestMultibase": "zQmAPdhyxzznFCwYxAp2dRerWC85Wg6wFl9G270iEu5h6JqW"
+  }]
+  
+}
+        
+ +

+In the example above, the issuer has provided an SVG rendering template +for a bachelor's degree that will be filled in with the information in the +verifiable credential. +

+ +
+
SvgRenderingTemplate2023 Algorithm
+ +

+The following algorithm is used to transform the SVG image template into the +final SVG image that is displayed. The inputs to the algorithm are the +verifiable credential (`verifiableCredential`) and the SVG image +source code (`svgImage`). The output is a SVG image. +

+ +
    +
  1. +Generate a map, `replacementMap`, by finding all strings in `svgImage` that +start with `{{` (double open braces) and end with `}}` +(double close braces). For each string, `templateKey`, that is found: +
      +
    1. +Generate another string, `templateValue`, by evaluating the value of +`templateKey` (without the opening or closing braces) using the JSON +Pointer [[RFC6901]] algorithm with the `verifiableCredential` as input to the +algorithm. If the evaluation is `null`, set `templateValue` to the empty string. +
    2. +
    3. +Set a key in `replacementMap` by using `templateKey` and associate it with +`templateValue`. +
    4. +
    +
  2. +
  3. +For every key in `replacementMap`, replace each corresponding +string in `svgImage` that matches the key with the associated value in the +`replacementMap`. +
  4. +
+
+
+
+

Terms of Use