Open davidlehn opened 1 year ago
Hi,
I just wanted to share what we do with Blockcerts as we've been doing a visual layer since the inception (before VCs where VCs).
From the beginning, the display
property as it's called (displayHtml
in the earlier versions) was only a HTML string (with inline CSS and base64 encoded images).
In our V3 we have opened support for more than just HTML and we can render images (gif, jpeg, png, bmp) and pdf documents, provided those binary files are base64 encoded).
The property schema is consultable here https://github.com/blockchain-certificates/cert-schema/blob/master/cert_schema/3.1/displaySchema.json
but basically we have:
{
... // VC root
display: {
content: "<p>Hello World</p>",
contentMediaType: "text/html",
}
}
or with a binary file:
{
... // VC root
display: {
"contentMediaType": "image/png",
"contentEncoding": "base64",
"content": "iVBORw0KGgoAAAANSUhEUg..."
}
}
Then we have a renderer web component which builds the HTML as needed depending on the media type: https://github.com/blockchain-certificates/blockcerts-verifier/blob/master/src/selectors/certificate.ts#L193
I generally agree with the proposal, I like how encapsulated it can be and I like the distant hosting with a digest (I think it is easier than using hashlinks).
However I believe it should allow for self contained data, at the expense of having larger credentials but with the added benefits:
The current (2023-04-28) example looks like this:
I think the data modeling here needs some work.
renderMethod
should be an SVG itself.I'd propose a few things:
renderMethod
should be a set of*RenderMethod*
types.SvgTemplateRenderMethod2023
.id
.I'm not sure what the vision is here how the user agents will work. Some issues:
content-type
andaccept
like semantics with media types and quality params? That could leverage known methods and code to pick how to display things.With the above, and some extra methods just to show the concept:
If you moved that off to another URL it might collapse to a cachable static file so the VC only as a reference: