(Relevant to #519 and #518)
Create a separate repo and library to process the renderMethod property of a VC.
Initially:
If the renderMethod value is an object, just use that. If it's an array, use the first object in the array. (We'll add processing for multiple renderMethod values later.)
Only support the SvgRenderingTemplate2023 type to start with.
Only support linking to a template. Meaning, fetch the contents of the URL contained in the id field.
Return a { template: { contents, mediaType } } object. contents contains the fetched contents from id (so, the SVG template), and mediaType will be text/x-handlebars to denote that Handlebars processing is needed.
Later (separate issues/PRs):
Perform verification of the digestSRI or digestMultibase fields, throw error if digest does not match.
Support embedded templates (as opposed to linked in the id)
(Relevant to #519 and #518) Create a separate repo and library to process the
renderMethod
property of a VC.Initially:
renderMethod
value is an object, just use that. If it's an array, use the first object in the array. (We'll add processing for multiple renderMethod values later.)SvgRenderingTemplate2023
type to start with.id
field.{ template: { contents, mediaType } }
object.contents
contains the fetched contents fromid
(so, the SVG template), andmediaType
will betext/x-handlebars
to denote that Handlebars processing is needed.Later (separate issues/PRs):
digestSRI
ordigestMultibase
fields, throw error if digest does not match.id
)