This repository contains prototype Python scripts that:
These scripts are preliminary work in a possible transition of using the W3C Verifiable Credential Data Model Standard for AnonCreds verifiable credentials and presentations. As demonstrated by the back and forth nature of the conversion and the absence of any cryptography library dependencies, nothing is being done to change the AnonCreds signatures or to alter the semantics of the AnonCreds credentials and presentations. The same AnonCreds code that is currently used in issuing, holding, proving and verifying AnonCreds continues to be used. The only change is the representation (arrangement of the JSON) within the credential and presentation.
To run the generator with your own examples:
credentials
folder, and your AnonCreds presentations in the presentations
folder../generateAll
W3COutput
folder to see all of the converted credentials and presentations.To run the scripts directly, use:
python credential_to_w3c.py <input file> [> output.json]
python presentation_to_w3c_vp.py <input file> [> output.json]
encoded
values of the AnonCreds
verifiable credential attributes in the W3C formats, using instead a
flag "encoding": "auto",
, and converting raw
to encoded
data on
the fly. The encoder matches Aries RFC 0592 Indy Attachments section on
Encoding
Claims.
We think that the code for generating the encoded values should be moved into
AnonCreds and out of the hands of the Issuer.Feedback, issues and pull requests welcome!