The CLI tool supports VCDM (Verifiable Credentials Data Model) version 1.1 and 2.0. By default, it uses version 1.1. This page explains how to use the CLI for VCDM version 2.0.
VCDM 2.0 is based on the W3C Verifiable Credentials Data Model v2.0 specification, which provides an extensible data model for verifiable credentials, how they can be secured from tampering, and a three-party ecosystem for the exchange of these credentials.
The EBSI implementation of VCDM 2.0 uses a specific trust model. For more information about the trust model used in VCDM 2.0, see the Issuer Trust Model v4 documentation.
Main Schemas
VCDM 2.0 in EBSI uses two main schemas:
- Attestation Schema: The @cef-ebsi/vcdm2.0-attestation-schema package provides the schema for attestations in VCDM 2.0 credentials.
- Trust Model Schema: The @cef-ebsi/vcdm2.0-trust-model-schema package provides the schema for the trust model used in VCDM 2.0 credentials.
Issue Verifiable Credentials
To issue verifiable credentials using VCDM 2.0, use the following command:
==> compute createVcJwt payload {} ES256 2.0
The 2.0 argument at the end makes sure to use VCDM version 2.0 instead of the default 1.1.
Issue Verifiable Presentations
To create a verifiable presentation with VCDM 2.0, use the following command:
==> compute createVpJwt vc {} jwtPayload ES256 2.0
Interact with Authorisation API
The interaction with the authorisation API involves the creation of verifiable presentations. Add 2.0 as the last argument to use VCDM 2.0. Example:
==> authorisation auth didr_invite_presentation ES256 vcOnboard 2.0
If you don't need to wrap a VC in the presentation, use []. Example:
==> authorisation auth didr_write_presentation ES256K [] 2.0
Scripts
There are several scripts in the vcdm2.0 folder. Some of them are:
Issue VC Onboard
==> run vcdm2/issueVcOnboard <did>
This script issues a verifiable credential to onboard a user.
Issue VC TAO
==> run vcdm2/issueVcTAO <did>
This script issues a credential for a new TAO (Trusted Accreditation Organisation).
Issue VC Root TAO
==> run vcdm2/issueVcRootTAO <did> <trustFramework> <policyId> <legalBasis>
This script includes more arguments in order to fill the trust framework in terms of use. Example:
==> run vcdm2/issueVcRootTAO user.did Education https://ebsi.eu/education "Primary Education"