From 632ef1a5acbfe6008fe65d3ec27d1c4edffe759c Mon Sep 17 00:00:00 2001
From: Benjamin Young
@@ -463,7 +463,7 @@ The `renderMethod` Property
- TemplateRenderMethod
TemplateRenderMethod
information from the [=verifiable credential=] listed in `renderProperty`.
The `svg-mustache` render suite uses the Mustache templating language to @@ -531,7 +531,7 @@
The `pdf-mustache` render suite uses the Mustache templating language to
From da4da7428b5bc1e495b27dcb98df0c76d01f4056 Mon Sep 17 00:00:00 2001
From: Benjamin Young The `pdf-mustache` Render Suite
+In situations where templating is not required, an [=issuer=] can provide a +predetermined payload to be displayed, transmitted, or otherwise rendered. +
+ +| Property | +Description | +||||||||
|---|---|---|---|---|---|---|---|---|---|
| id | ++An OPTIONAL [=string=] that follows the [[[URL]]] and, when fetched, +dereferences to a render template. + | +||||||||
| type | ++A REQUIRED [=string=] that MUST be the value `RenderMethod`. + | +||||||||
| modality | ++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`. + + + | +||||||||
| name | ++An OPTIONAL human-readable [=string=] that can be displayed to provide a hint to +the type of rendering that will be performed. This property might be used in a +graphical interface that enables an individual to select between multiple +presentation modes. + | +||||||||
| description | ++An OPTIONAL human-readable [=string=] that provides a more involved description +than `name` of when the particular rendering might be useful. + | +||||||||
| payload | +
+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:
+
|
+ ||||||||
| digestMultibase | ++An OPTIONAL multibase-encoded Multihash of the render method referenced if `id` +is specified. The multibase value MUST be `u` (base64url-nopad) and the multihash +value MUST be SHA-2 with 256-bits of output (`0x12`). + | +
-The `nfc` render suite transmits a binary payload representing the +The `nfc` render modality 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. +In the example below, a fully embedded NFC payload is used.
The `nfc` Render Suite
{
...
"renderMethod": {
- "type": "TemplateRenderMethod",
- "renderSuite": "nfc",
+ "type": "RenderMethod",
+ "modality": "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"]
+ "payload": "data:application/octet-stream;base64,2QZkpQGDG...G8XJWnROcY4Biw"
}
}
+
+
+In situations where templating is not required, an [=issuer=] can provide a +predetermined payload to be displayed, transmitted, or otherwise rendered. +
+ +| Property | +Description | +||||||||
|---|---|---|---|---|---|---|---|---|---|
| id | ++An OPTIONAL [=string=] that follows the [[[URL]]] and, when fetched, +dereferences to a render template. + | +||||||||
| type | ++A REQUIRED [=string=] that MUST be the value `RenderMethod`. + | +||||||||
| modality | ++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`. + + + | +||||||||
| name | ++An OPTIONAL human-readable [=string=] that can be displayed to provide a hint to +the type of rendering that will be performed. This property might be used in a +graphical interface that enables an individual to select between multiple +presentation modes. + | +||||||||
| description | ++An OPTIONAL human-readable [=string=] that provides a more involved description +than `name` of when the particular rendering might be useful. + | +||||||||
| payload | +
+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:
+
|
+ ||||||||
| digestMultibase | ++An OPTIONAL multibase-encoded Multihash of the render method referenced if `id` +is specified. The multibase value MUST be `u` (base64url-nopad) and the multihash +value MUST be SHA-2 with 256-bits of output (`0x12`). + | +
+The `nfc` render modality transmits a binary payload representing the +[=verifiable credential=] over a wireless NFC connection. +
+ ++In the example below, a fully embedded NFC payload is used. +
+ +
+{
+ ...
+ "renderMethod": {
+ "type": "RenderMethod",
+ "modality": "nfc",
+ "name": "Tap to send",
+ // the NFC payload is embedded
+ "payload": "data:application/octet-stream;base64,2QZkpQGDG...G8XJWnROcY4Biw"
+ }
+
+}
+
+
+
+
+ -In situations where templating is not required, an [=issuer=] can provide a -predetermined payload to be displayed, transmitted, or otherwise rendered. -
- -| Property | -Description | -||||||||
|---|---|---|---|---|---|---|---|---|---|
| id | --An OPTIONAL [=string=] that follows the [[[URL]]] and, when fetched, -dereferences to a render template. - | -||||||||
| type | --A REQUIRED [=string=] that MUST be the value `RenderMethod`. - | -||||||||
| modality | --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`. - - - | -||||||||
| name | --An OPTIONAL human-readable [=string=] that can be displayed to provide a hint to -the type of rendering that will be performed. This property might be used in a -graphical interface that enables an individual to select between multiple -presentation modes. - | -||||||||
| description | --An OPTIONAL human-readable [=string=] that provides a more involved description -than `name` of when the particular rendering might be useful. - | -||||||||
| payload | -
-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:
-
|
- ||||||||
| digestMultibase | --An OPTIONAL multibase-encoded Multihash of the render method referenced if `id` -is specified. The multibase value MUST be `u` (base64url-nopad) and the multihash -value MUST be SHA-2 with 256-bits of output (`0x12`). - | -
-The `nfc` render modality transmits a binary payload representing the -[=verifiable credential=] over a wireless NFC connection. -
- --In the example below, a fully embedded NFC payload is used. -
- -
-{
- ...
- "renderMethod": {
- "type": "RenderMethod",
- "modality": "nfc",
- "name": "Tap to send",
- // the NFC payload is embedded
- "payload": "data:application/octet-stream;base64,2QZkpQGDG...G8XJWnROcY4Biw"
- }
-
-}
-
-
-
-
- -In situations where templating is not required, an [=issuer=] can provide a -predetermined payload to be displayed, transmitted, or otherwise rendered. +The `RenderMethod` base class can be used to provide a predetermined payload to +be displayed, transmitted, or otherwise rendered when templating is not required.
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. +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.
| id | --An OPTIONAL [=string=] that follows the [[[URL]]] and, when fetched, -dereferences to a render template. - | -||||||||
| type | --A REQUIRED [=string=] that MUST be the value `TemplateRenderMethod`. - | -||||||||
| renderSuite |
@@ -493,81 +481,11 @@ TemplateRenderMethodgenerating the concrete rendering. |
||||||||
| name | --An OPTIONAL human-readable [=string=] that can be displayed to provide a hint to -the type of rendering that will be performed. This property might be used in a -graphical interface that enables an individual to select between multiple -presentation modes. - | -||||||||
| description | --An OPTIONAL human-readable [=string=] that provides a more involved description -than `name` of when the particular rendering might be useful. - | -||||||||
| 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
-a URL. If the value is a [=ordered map|map=], it MUST conform to the following
-rules:
-
|
- ||||||||
| digestMultibase | --An OPTIONAL multibase-encoded Multihash of the render method referenced if `id` -is specified. The multibase value MUST be `u` (base64url-nopad) and the multihash -value MUST be SHA-2 with 256-bits of output (`0x12`). - | -
-The data model shown above is expressed in a [=verifiable credential=] -in the example below. -
-
+ title="Usage of the renderSuite property by an issuer">
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
@@ -588,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",
@@ -628,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"
}
}
@@ -645,7 +563,7 @@