w3c / w3c/vc-render-method

Support for functional operations

Open
#22 3 comments 0 reactions 2 assignees View on GitHub

@BigBlueHat is already working on this.

Since May 14, 2025.

ready for pr
Dominant language
HTML
Stars
9
Forks
8
Avg merge
14d 42m
Merged PRs (30d)
2

Description

It would be great if we could enable support for functional operations on credential values.

This will enable template designers to transform a machine readable value to a human readable one. This came up for me when I wanted to use dates in the template. Because credential dates are often in ISO 8601 format (e.g., 2025-04-16T16:11:18.316Z), they are not readily suitable for human consumption (e.g., 4/16/2025 or 2025-04-16).

To solve this issue, I was tempted to use a jsonata function in a mustache template like this:

Date: {{$fromMillis($toMillis(validFrom), "[M]/[D]/[Y]")}}

...but since mustache is "logic-less", this is technically improper and not recognizable by common mustache libraries. So, we would either need to think of other templating languages that provide this type of support or provide a mechanism for this via a property in renderMethod.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.