The HTML Render Method approach uses
a sandboxed environment (typically an
<iframe> + CSP)
to allow JavaScript to be used for rendering (some or all of) a Verifiable
Credential into an HTML page.
This allows developers to provide a JavaScript rendering runtime while preventing access to the network for that runtime.
graph TD
subgraph Wallet's VC Rendering HTML
direction LR
A(Verifiable Credential) -- selectively disclosed --> B{VC subset}
subgraph "iframe[srcdoc] w/Render Method HTML"
B{VC Subset} --> C[JavaScript]
end
end
- index.html - the Wallet/host rendering HTML page
- has access to complete Verifiable Credential
- creates
<iframe>and setssrcdoc=""on it to the "rendering runtime"
- pointer.js - minimal JSON Pointer parser for handling
renderProperty - render.js - library to create the
<iframe>; contains the test template code - select.js - does the selective disclosure using
pointer.jslookups