openwallet-foundation-labs / sd-jwt-js

A JavaScript implementation of the Selective Disclosure JWT (SD-JWT) spec.
https://sdjwt.js.org/
Apache License 2.0
36 stars 12 forks source link

Feat/type metadata #247

Closed cre8 closed 1 month ago

cre8 commented 1 month ago

Adding the schema validation based on the typed metadata.

This feature has to be activated with a parameter when the instance is created without breaking existing applications. The function to fetch the typed metadata can be overridden, the default one with fetch it from the url.

At this point it is only used for validation, after this MR got merged, the metadata should be fetched via a function (either be returned after the validation and/or it's able to fetch them via a dedicated call to skip the validation of the credential) to receive the display information.