Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 95 additions & 64 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,12 @@ <h3>The `renderMethod` Property</h3>
</dl>
</section>

<section>
<h4>TemplateRenderMethod</h4>
<section><!-- RenderMethod -->
<h4>RenderMethod</h4>

<p>
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.
</p>

<table class="simple">
Expand All @@ -329,14 +328,19 @@ <h4>TemplateRenderMethod</h4>
<tr>
<td>type</td>
<td>
A REQUIRED [=string=] that MUST be the value `TemplateRenderMethod`.
A REQUIRED [=string=] that MUST be the value `RenderMethod`.
</td>
</tr>
<tr>
<td>renderSuite</td>
<td>modality</td>
<td>
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might make more sense to make this field OPTIONAL. (or, if missing, default to the value default or something similar)

transmitted or rendered. Possible examples of modalities may include `nfc`,
Copy link
Member

@TallTed TallTed Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible, examples, and may are redundant.

Suggested change
transmitted or rendered. Possible examples of modalities may include `nfc`,
transmitted or rendered. Possible modalities include `nfc`,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or

Suggested change
transmitted or rendered. Possible examples of modalities may include `nfc`,
transmitted or rendered. Example modalities include `nfc`,

`qr-code`, `audio`, and `braille`.

<aside class="issue">
Define additional modalities.
</aside>
</td>
</tr>
<tr>
Expand All @@ -356,20 +360,10 @@ <h4>TemplateRenderMethod</h4>
</td>
</tr>
<tr>
<td>renderProperty</td>
<td>payload</td>
<td>
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.
</td>
</tr>
<tr>
<td>template</td>
<td>
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:
<table class="simple">
Expand Down Expand Up @@ -406,6 +400,16 @@ <h4>TemplateRenderMethod</h4>
</table>
</td>
</tr>
<tr>
<td>renderProperty</td>
<td>
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.
</td>
</tr>
<tr>
<td>digestMultibase</td>
<td>
Expand All @@ -415,15 +419,73 @@ <h4>TemplateRenderMethod</h4>
</td>
</tr>
</tbody>
</table>
</table>

<section>
<h3>The `nfc` Render Modality</h3>
<p>
The `nfc` render modality transmits a binary payload representing the
[=verifiable credential=] over a wireless NFC connection.
</p>

<p>
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.
</p>

<pre class="example nohighlight"
title="Usage of the render property by an issuer">
title="Usage of the nfc render suite">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title="Usage of the nfc render suite">
title="Use of the NFC render suite">

{
<span class="comment">...</span>
"renderMethod": {
"type": "RenderMethod",
"modality": "nfc",
"name": "Tap to send",
<span class="comment">// the NFC payload is embedded</span>
"payload": "data:application/octet-stream;base64,2QZkpQGDG...G8XJWnROcY4Biw"
}
</span>
}
</pre>

<aside class="note">
Trust is placed in the [=issuer=] that the contained payload is a minimally
sufficient representation of the [=verifiable credential=] for verification
purposes.
</aside>

</section>
</section>

<section><!-- TemplateRenderMethod -->
<h4>TemplateRenderMethod</h4>

<p>
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.
</p>

<table class="simple">
<thead>
<tr>
<th style="white-space: nowrap">Property</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>renderSuite</td>
<td>
A REQUIRED [=string=] that identifies the algorithms that are used for
generating the concrete rendering.
</td>
</tr>
</tbody>
</table>

<pre class="example nohighlight"
title="Usage of the renderSuite property by an issuer">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title="Usage of the renderSuite property by an issuer">
title="Use of the renderSuite property by an issuer">

{
"@context": [
"https://www.w3.org/ns/credentials/v2",
Expand All @@ -444,7 +506,7 @@ <h4>TemplateRenderMethod</h4>
<span class="highlight">"renderMethod": {
"type": "TemplateRenderMethod",
"renderSuite": "svg-mustache",
"template": {
"payload": {
"id": "https://example.edu/credential-templates/BachelorDegree",
"mediaType": "image/svg+xml",
"digestMultibase": "zQmerWC85Wg6wFl9znFCwYxApG270iEu5h6JqWAPdhyxz2dR",
Expand All @@ -463,7 +525,7 @@ <h4>TemplateRenderMethod</h4>
information from the [=verifiable credential=] listed in `renderProperty`.
</p>

<section>
<section><!-- svg-mustache Render Suite -->
<h3>The `svg-mustache` Render Suite</h3>
<p>
The `svg-mustache` render suite uses the Mustache templating language to
Expand All @@ -484,7 +546,7 @@ <h3>The `svg-mustache` Render Suite</h3>
"type": "TemplateRenderMethod",
"renderSuite": "svg-mustache",
<span class="comment">// the SVG file is embedded in the VC</span>
"template": "data:image/svg+xml;base64,Qjei89...3jZpW"
"payload": "data:image/svg+xml;base64,Qjei89...3jZpW"
}
}
</pre>
Expand All @@ -501,7 +563,7 @@ <h3>The `svg-mustache` Render Suite</h3>
"renderMethod": {
"type": "TemplateRenderMethod",
"renderSuite": "svg-mustache",
"template": {
"payload": {
<span class="comment">// this SVG file is fetched from the Web</span>
"id": "https://degree.example/credential-templates/bachelors",
"mediaType": "image/svg+xml",
Expand Down Expand Up @@ -531,7 +593,7 @@ <h3>The `svg-mustache` Render Suite</h3>

</section>

<section>
<section><!-- pdf-mustache Render Suite -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove the pdf-mustache section. PDF is a binary format, it's not really possible to use Mustache with it.

<h3>The `pdf-mustache` Render Suite</h3>
<p>
The `pdf-mustache` render suite uses the Mustache templating language to
Expand All @@ -552,7 +614,7 @@ <h3>The `pdf-mustache` Render Suite</h3>
"type": "TemplateRenderMethod",
"renderSuite": "pdf-mustache",
<span class="comment">// this PDF file is embedded in the VC</span>
"template": "data:application/pdf;base64,k309SK...pwK83b"
"payload": "data:application/pdf;base64,k309SK...pwK83b"
}
}
</pre>
Expand All @@ -569,7 +631,7 @@ <h3>The `pdf-mustache` Render Suite</h3>
"renderMethod": {
"type": "TemplateRenderMethod",
"renderSuite": "pdf-mustache",
"template": {
"payload": {
<span class="comment">// this PDF file is fetched from the Web</span>
"id": "https://degree.example/bachelors.pdf",
"mediaType": "application/pdf",
Expand Down Expand Up @@ -598,38 +660,7 @@ <h3>The `pdf-mustache` Render Suite</h3>

</section>

<section>
<h3>The `nfc` Render Suite</h3>
<p>
The `nfc` render suite transmits a binary payload representing the
[=verifiable credential=] over a wireless NFC connection.
</p>

<p>
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.
</p>

<pre class="example nohighlight"
title="Usage of the nfc render suite">
{
<span class="comment">...</span>
"renderMethod": {
"type": "TemplateRenderMethod",
"renderSuite": "nfc",
"name": "Tap to send",
<span class="comment">// the NFC payload is embedded</span>
"template": "data:application/octet-stream;base64,2QZkpQGDG...G8XJWnROcY4Biw",
<span class="comment">// only the barcode is transmitted over NFC</span>
"renderProperty": ["/credentialSubject/barcode"]
}
</span>
}
</pre>

</section>
</section>

<section>
<h4>OpenAttestationEmbeddedRenderer</h4>
Expand Down