-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: RenderTemplate2024
#9
Comments
<!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. For a timely review/response, please avoid force-pushing additional commits if your PR already received reviews or comments. Before submitting a Pull Request, please ensure you've done the following: - 📖 Read the [Contributing Guide](https://github.com/uncefact/project-vckit/blob/main/CONTRIBUTING.md). - 📖 Read the [Code of Conduct](https://github.com/uncefact/project-vckit/blob/main/CODE_OF_CONDUCT.md). - 👷♀️ Create small PRs. In most cases, this will be possible. - ✅ Provide tests for your changes. - 📝 Use descriptive commit messages following [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). - 📗 Update any related documentation and include any relevant screenshots. --> ## What type of PR is this? (check all applicable) - [x] 🍕 Feature - [ ] 🐛 Bug Fix - [ ] 📝 Documentation Update - [ ] 🎨 Style - [ ] 🧑💻 Code Refactor - [ ] 🔥 Performance Improvements - [ ] ✅ Test - [ ] 🤖 Build - [ ] 🔁 CI - [ ] 📦 Chore (Release) - [ ] ⏩ Revert ## Description Some reference links about the compute hash: https://w3c-ccg.github.io/vc-render-method/#svgrenderingtemplate2023 w3c-ccg/vc-render-method#9 https://w3c-ccg.github.io/multibase/#tv-base58btc https://www.ietf.org/archive/id/draft-multiformats-multibase-08.html https://www.npmjs.com/package/multihashes <!-- Please do not leave this blank This PR [adds/removes/fixes/replaces] the [feature/bug/etc]. --> ## Related Tickets & Documents <!-- Please use this format link issue numbers: Fixes #123 https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> ## Mobile & Desktop Screenshots/Recordings <!-- Visual changes require screenshots --> ## Added tests? - [x] 👍 yes - [ ] 🙅 no, because they aren't needed - [ ] 🙋 no, because I need help ## Added to documentation? - [ ] 📜 README.md - [ ] 📓 [vc-kit doc site](https://uncefact.github.io/vckit/) - [ ] 📕 storybook - [x] 🙅 no documentation needed ## [optional] Are there any post-deployment tasks we need to perform? <!-- note: PRs with deleted sections will be marked invalid -->
Why not use |
The VC API group discussed this on a call today and there was no opposition to the general direction. On the call was @jandrieu @wes-smith @PatStLouis @cxcheng @TallTed and @msporny. |
I think |
Yes, I can kinda see that argument. The challenge is that
and then if we move digestMultibase in there, we need to move media type in there... hopefully that highlights the problem I'm concerned about? Maybe we move all of this inside |
@msporny I see. Two thoughts, then.
"renderMethod": [
{
"template": {
// For hosted templates
"id": "https://example.com/iso7810-landscape.svg",
"digestMultibase": "...."
},
// ...
},
{
"template": {
// For inline templates
"contents": "<template goes here>"
// "digestMultibase": -- not needed, since the data integrity proof secures embedded templates
},
// ...
}
] |
@dmitrizagidulin, @msporny, please take a look here at the modeling suggestions as perhaps some of this ground has been covered before: A combination of the information there and here might result in both a more correct and versatile data model. |
I think we need to do a slightly better job of separating the render method information from the template itself (or one or more templates potentially) -- and both the information and the template(s) may each potentially include a digest property, depending on whether they are embedded or simply referenced. |
A general observation since we went to a "date-less" type for |
The following proposals aims at a single, template format focused render method--where the content/media type decision becomes secondary (and is expressed separately). The proposed template engine would be Mustache for it's deliberate minimalism (though certainly alternatives could be explored).
The primary aim is to map the credential into a text-based template format (Mustache). The output format itself becomes a secondary concern (for rendering), though perhaps a primary concern for display/use choices.
Below is a proposed expression with inline comments:
Feedback welcome!
🎩
The text was updated successfully, but these errors were encountered: