diff --git a/index.html b/index.html index ebd66e1..f25d649 100644 --- a/index.html +++ b/index.html @@ -302,13 +302,12 @@

The `renderMethod` Property

-
-

TemplateRenderMethod

+
+

RenderMethod

-When an [=issuer=] desires to specify template-based rendering instructions -for a [=verifiable credential=], they MAY add a `renderMethod` property that uses -the data model described below. +The `RenderMethod` base class can be used to provide a predetermined payload to +be displayed, transmitted, or otherwise rendered when templating is not required.

@@ -329,14 +328,19 @@

TemplateRenderMethod

- + @@ -356,20 +360,10 @@

TemplateRenderMethod

- + - - - - + + + + -
type -A REQUIRED [=string=] that MUST be the value `TemplateRenderMethod`. +A REQUIRED [=string=] that MUST be the value `RenderMethod`.
renderSuitemodality -A REQUIRED [=string=] that identifies the algorithms that are used for -generating the concrete rendering. +A REQUIRED [=string=] that identifies the mode by which the payload will be +transmitted or rendered. Possible examples of modalities may include `nfc`, +`qr-code`, `audio`, and `braille`. + +
renderPropertypayload -An OPTIONAL [=list=] of [=string=] values that each conform to the -[[[RFC6901]]] syntax that specifies which properties from the [=verifiable -credential=] are exposed when using this specific render method. If -`renderProperty` is not provided, the entire [=verifiable credential=] is -presumed to be shared when the render method is used. -
template -An OPTIONAL [=string=] or [=ordered map|map=] that provides the template that -will be used to perform the rendering. If the value is a [=string=], it MUST be +An OPTIONAL [=string=] or [=ordered map|map=] that provides the raw data that +will be used for rendering. If the value is a [=string=], it MUST be a URL. If the value is a [=ordered map|map=], it MUST conform to the following rules: @@ -406,6 +400,16 @@

TemplateRenderMethod

renderProperty +An OPTIONAL [=list=] of [=string=] values that each conform to the +[[[RFC6901]]] syntax that specifies which properties from the [=verifiable +credential=] are exposed when using this specific render method. If +`renderProperty` is not provided, the entire [=verifiable credential=] is +presumed to be shared when the render method is used. +
digestMultibase @@ -415,15 +419,73 @@

TemplateRenderMethod

+ + +
+

The `nfc` Render Modality

+

+The `nfc` render modality transmits a binary payload representing the +[=verifiable credential=] over a wireless NFC connection. +

-The data model shown above is expressed in a [=verifiable credential=] -in the example below. +In the example below, a fully embedded NFC payload is used.

+               title="Usage of the nfc render suite">
+{
+  ...
+  "renderMethod": {
+    "type": "RenderMethod",
+    "modality": "nfc",
+    "name": "Tap to send",
+    // the NFC payload is embedded
+    "payload": "data:application/octet-stream;base64,2QZkpQGDG...G8XJWnROcY4Biw"
+  }
+  
+}
+          
+ + + +
+
+ +
+

TemplateRenderMethod

+ +

+When an [=issuer=] desires to specify template-based rendering instructions +for a [=verifiable credential=], they MAY add a `renderMethod` property using +the `TemplateRenderMethod` class on the base data model adding additional +processing instructions as described below. +

+ + + + + + + + + + + + + + +
PropertyDescription
renderSuite +A REQUIRED [=string=] that identifies the algorithms that are used for +generating the concrete rendering. +
+ +
 {
   "@context": [
     "https://www.w3.org/ns/credentials/v2",
@@ -444,7 +506,7 @@ 

TemplateRenderMethod

"renderMethod": { "type": "TemplateRenderMethod", "renderSuite": "svg-mustache", - "template": { + "payload": { "id": "https://example.edu/credential-templates/BachelorDegree", "mediaType": "image/svg+xml", "digestMultibase": "zQmerWC85Wg6wFl9znFCwYxApG270iEu5h6JqWAPdhyxz2dR", @@ -463,7 +525,7 @@

TemplateRenderMethod

information from the [=verifiable credential=] listed in `renderProperty`.

-
+

The `svg-mustache` Render Suite

The `svg-mustache` render suite uses the Mustache templating language to @@ -484,7 +546,7 @@

The `svg-mustache` Render Suite

"type": "TemplateRenderMethod", "renderSuite": "svg-mustache", // the SVG file is embedded in the VC - "template": "data:image/svg+xml;base64,Qjei89...3jZpW" + "payload": "data:image/svg+xml;base64,Qjei89...3jZpW" } }
@@ -501,7 +563,7 @@

The `svg-mustache` Render Suite

"renderMethod": { "type": "TemplateRenderMethod", "renderSuite": "svg-mustache", - "template": { + "payload": { // this SVG file is fetched from the Web "id": "https://degree.example/credential-templates/bachelors", "mediaType": "image/svg+xml", @@ -531,7 +593,7 @@

The `svg-mustache` Render Suite

-
+

The `pdf-mustache` Render Suite

The `pdf-mustache` render suite uses the Mustache templating language to @@ -552,7 +614,7 @@

The `pdf-mustache` Render Suite

"type": "TemplateRenderMethod", "renderSuite": "pdf-mustache", // this PDF file is embedded in the VC - "template": "data:application/pdf;base64,k309SK...pwK83b" + "payload": "data:application/pdf;base64,k309SK...pwK83b" } } @@ -569,7 +631,7 @@

The `pdf-mustache` Render Suite

"renderMethod": { "type": "TemplateRenderMethod", "renderSuite": "pdf-mustache", - "template": { + "payload": { // this PDF file is fetched from the Web "id": "https://degree.example/bachelors.pdf", "mediaType": "application/pdf", @@ -598,38 +660,7 @@

The `pdf-mustache` Render Suite

-
-

The `nfc` Render Suite

-

-The `nfc` render suite transmits a binary payload representing the -[=verifiable credential=] over a wireless NFC connection. -

- -

-In the example below, a fully embedded NFC payload is used as the rendering -template, which only discloses the barcode identifier associated with the -credential. -

- -
-{
-  ...
-  "renderMethod": {
-    "type": "TemplateRenderMethod",
-    "renderSuite": "nfc",
-    "name": "Tap to send",
-    // the NFC payload is embedded
-    "template": "data:application/octet-stream;base64,2QZkpQGDG...G8XJWnROcY4Biw",
-    // only the barcode is transmitted over NFC
-    "renderProperty": ["/credentialSubject/barcode"]
-  }
-  
-}
-        
-
-

OpenAttestationEmbeddedRenderer