digitalbazaar / vc

W3C Verifiable Credentials implementation in JavaScript
BSD 3-Clause "New" or "Revised" License
182 stars 52 forks source link

fix(credential): unify normalization of context #146

Open jceb opened 1 year ago

jceb commented 1 year ago

In the current implementation, @context is only normalized for presentations and not for credentials. This PR unifies normalization so that strings are also supported.

Having said that, according to the spec @context must be an ordered set: https://w3c.github.io/vc-data-model/#contexts. Not sure if it's a good idea to support this any. Whatever is done, the behavior should be the same for presentations and credentials :-D