Skip to content
Open
Show file tree
Hide file tree
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
Binary file added images/embedded-renderer-sequence-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/oa-embedded-sequence-diagram.png
Binary file not shown.
88 changes: 36 additions & 52 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,10 @@ <h3>The `nfc` Render Suite</h3>
</section>

<section>
<h4>OpenAttestationEmbeddedRenderer</h4>
<h4>EmbeddedRenderer</h4>

<p>
OpenAttestationEmbeddedRenderer is used by an issuer to render a verifiable
EmbeddedRenderer is used by an issuer to render a verifiable
credential. The verifiable credential is rendered in HTML within an embedded
`&ltiframe&gt` through a Template Renderer website referenced in
the document. This arrangement allows for interactive selective disclosure
Expand All @@ -644,8 +644,8 @@ <h4>OpenAttestationEmbeddedRenderer</h4>
process.
</p>
<p>
There currently exists a number of OpenAttestationEmbeddedRenderer issuers
and decentralized renderer implementations.
There currently exists a number of EmbeddedRenderer issuers
and embedded renderer implementations.
</p>
<p>
When an [=issuer=] desires to specify an embedded rendering instructions
Expand All @@ -665,18 +665,18 @@ <h4>OpenAttestationEmbeddedRenderer</h4>
<td>id</td>
<td>
A URL that locates a website that implements the
OpenAttestationEmbeddedRenderer Action API.
EmbeddedRenderer Action API.
</td>
</tr>
<tr>
<td>type</td>
<td>The `type` property MUST be `OpenAttestationEmbeddedRenderer`.</td>
<td>The `type` property MUST be `EmbeddedRenderer`.</td>
</tr>
<tr>
<td>renderName</td>
<td>
Name of the template used by the website specified by `id` to render
the document. A different template can be used for the decentralized
the document. A different template can be used for the embedded
renderer to present a different HTML view of the verifiable
credential.
</td>
Expand All @@ -693,69 +693,53 @@ <h4>OpenAttestationEmbeddedRenderer</h4>
class="example nohighlight"
title="Usage of the renderMethod property by an issuer"
>
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://schemata.openattestation.com/com/openattestation/4.0/alpha-context.json"
],
"type": ["VerifiableCredential", "OpenAttestationCredential"],
"validFrom": "2021-03-08T12:00:00+08:00",
"name": "Republic of Singapore Driving Licence",
"issuer": {
"id": "did:ethr:0xB26B4941941C51a4885E5B7D3A1B861E54405f90",
"type": "OpenAttestationIssuer",
"name": "Government Technology Agency of Singapore (GovTech)",
"identityProof": { "identityProofType": "DNS-DID", "identifier": "example.openattestation.com" }
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://w3id.org/security/data-integrity/v2",
"https://trustvc.io/context/render-method-context-v2.json",
],
"credentialSubject": {
...
},
"type": ["VerifiableCredential"],
"issuer": "did:web:trustvc.github.io:did:1",
"validFrom": "2024-04-01T12:19:52Z",
"id": "urn:uuid:01992e54-cc5e-700e-a80b-60ddf0fffca9",
},
"credentialSubject": {
"id": "urn:uuid:a013fb9d-bb03-4056-b696-05575eceaf42",
"type": ["DriversLicense"],
"name": "John Doe",
"address": "123 Choa Chu Kang Road, Singapore 123456",
"licenses": [
{
"class": "3",
"description": "Motor cars with unladen weight <= 3000kg",
"effectiveDate": "2013-05-16T00:00:00+08:00"
},
<span class="highlight">"renderMethod": [
{
"class": "3A",
"description": "Motor cars with unladen weight <= 3000kg",
"effectiveDate": "2013-05-16T00:00:00+08:00"
"type": "EMBEDDED_RENDERER",
"templateName": "DEMO_CERTIFICATE",
"id": "https://generic-templates.tradetrust.io"
}
]
},
<span class="highlight">"renderMethod": [{
"id": "https://demo-renderer.opencerts.io",
"type": "OpenAttestationEmbeddedRenderer",
"rendererName": "GOVTECH_DEMO"
}]</span>
]</span>
}
</pre>

<p>
The [=verifiable credential=] specifies a decentralized renderer at
`https://demo-renderer.opencerts.io`, using the template named
`GOVTECH_DEMO`.
The [=verifiable credential=] specifies a embedded renderer at
`https://generic-templates.tradetrust.io`, using the template named
`DEMO_CERTIFICATE`.
</p>
<p>
The decentralized renderer can support different templates that can provide
The embedded renderer can support different templates that can provide
different views of the verifiable credentials. Below are two renderings of
the same [=verifiable credential=] using different templates.
</p>

<figure id="oa-embedded-certificate">
<figure id="embedded-renderer-certificate-template">
<img
style="width: 100%"
src="images/oa-embedded-certificate.png"
src="images/embedded-renderer-certificate.png"
alt="Certificate Template"
/>
<figcaption>Certificate Template</figcaption>
</figure>
<figure id="oa-embedded-transcript">
<figure id="embedded-renderer-transcript-template">
<img
style="width: 100%"
src="images/oa-embedded-transcript.png"
src="images/embedded-renderer-transcript.png"
alt="Transcript Template"
/>
<figcaption>Transcript Template</figcaption>
Expand Down Expand Up @@ -789,18 +773,18 @@ <h5>Action API</h5>
<p>
An open source reference implementation is available on
<a
href="https://github.com/Open-Attestation/decentralized-renderer-react-components"
href="https://github.com/TrustVC/decentralized-renderer-react-components"
>GitHub</a
>.
</p>
<p>
The interaction between the Host and the Template Renderer is illustrated in
the following diagram.
</p>
<figure id="oa-embedded-sequence-diagram">
<figure id="embedded-renderer-sequence-diagram">
<img
style="width: 100%"
src="images/oa-embedded-sequence-diagram.png"
src="images/embedded-renderer-sequence-diagram.png"
alt="Sequence Diagram"
/>
<figcaption>Sequence Diagram</figcaption>
Expand Down