- Verifiable Credential
- Verifiable Presentation
- Challenge Request (not part of the official specification)
- Proof (will be part of the objects above)
In an existing project (with
npm install vp-toolkit-models --save
We strongly advise the vp-toolkit library to generate and verify these models more easily. You can create the models by passing the required values through the constructor.
The example below creates an unsigned VerifiableCredential object. To create a signed object, please use
// Dynamic fields can be found in the additionalFields property// Models can be stringified and parsed - the order of fields will not change.
The same approach works for a VerifiablePresentation and ChallengeRequest - but with different fields, obviously.
The ChallengeRequest object supports Zero Knowledge Range Proof by offering the
If you don't prefer to use the dynamic fields, you can also extend the models in your own codebase.
But when using the
vp-toolkit, you might need to write or override a signer and generator in order to include your custom fields into the signature.
Besides unit testing with Mocha, the effectivity of all tests are also measured with the Stryker mutation testing framework.
npm run testnpm run stryker
We aim to achieve a coverage of 100%. Stryker and/or mocha test scores below 80% will fail the build.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License and disclaimer
We discourage the use of this work in production environments as it is in active development and not mature enough.