Skip to main content
European CommissionEBSI European Blockchain

Credentials

Commands for creating, verifying, and managing verifiable credentials and presentations.

compute createVcJwt <vcPayload> <jwtPayload> <alg>

Command to create a verifiable credential with JWT format. It automatically defines relevant data like context, type, issuance date, and expiration date. The credential is signed with the user defined in using user.

Parameters:

  • vcPayload: Payload to include in "vc" field. Context, id, type, issuer, issuance/expiration date are automatically generated but can be overwritten.
  • jwtPayload: Payload to include outside "vc" field.
  • alg (optional): Signing algorithm to be used. It should be ES256K (default), ES256, RS256, or EdDSA. The private key should be defined for that algorithm (see using user).

Examples:

compute createVcJwt {"credentialSubject":{"id":"did:ebsi:123"}} {"sub":"did:ebsi:123"}
vc: compute createVcJwt {"credentialSubject":{"id":"did:ebsi:123"}} {"sub":"did:ebsi:123"} ES256

compute createVpJwt <verifiableCredential> <vpPayload> <jwtPayload> <alg>

Command to generate a Verifiable Presentation using the "vp_jwt" format. The presentation is signed with the user defined in using user.

Parameters:

  • verifiableCredential: Verifiable credential or list of verifiable credentials in JWT format.
  • vpPayload: Extra payload to include in the "vp" field.
  • jwtPayload: Extra payload to include outside the "vp" field.
  • alg (optional): Signing algorithm to be used. It should be ES256K (default), ES256, RS256, or EdDSA.

Examples:

compute createVpJwt eyJhb...
compute createVpJwt vc
compute createVpJwt vc {} {"aud":"any", "exp":1739853487}

compute verifyVcJwt <vcJwt> <options> <expectedResult>

Command to verify if a VC is valid or not.

Parameters:

  • vcJwt: Verifiable credential as JWT.
  • options: Verifiable credential options.
  • expectedResult: Set expectRevoked if you expect this VC to be revoked. Otherwise leave it empty.

Examples:

compute verifyVcJwt ey... {"skipCredentialSubjectValidation":true}
compute verifyVcJwt ey... {} expectRevoked

compute verifyVpJwt <vpJwt> <audience>

Command to verify if a VP is valid or not.

Parameters:

  • vpJwt: Verifiable presentation as JWT.
  • audience: Expected audience.

compute signJwt <payload> <alg> <headers>

Command to create a generic JWT.

Parameters:

  • payload: JSON payload.
  • alg: signing algorithm.
  • headers: JSON headers

compute checkStatusList2021CredentialSchema <credential>

Command to check if a credential is conformant with the Status List 2021 credential schema. It is useful to debug errors when registering a proxy in the Trusted Issuers Registry because this is one of the validations done in the API.

Parameters:

  • credential: Payload of the credential in JSON format.