PM2 Credential
Schema of a PM2 Verifiable Credential
The schema is published to the Trusted Schemas Registry with the IDs:
-
0x6f9dfe83f370108d69992fd47eb4aa1170b88f06a8aa552984ab200ae35801b5
(hexadecimal) -
z8Whz9dUuThrCd76CRnmZPBRtGLfmkwGT6tXj5uuincax
(multibase base58btc)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "PM2 Credential",
"description": "Schema of a PM2 Verifiable Credential",
"type": "object",
"allOf": [
{
"$ref": "./node_modules/@cef-ebsi/vcdm1.1-attestation-schema/schema.json"
},
{
"properties": {
"credentialSubject": {
"description": "Defines additional properties on credentialSubject to describe IDs that do not have a substantial level of assurance.",
"type": "object",
"properties": {
"id": {
"description": "Defines a unique identifier of the credential subject",
"type": "string"
},
"givenName": {
"description": "Name strings that are the part of a person's name that is not their surname (see RFC4519).",
"type": "string"
},
"familyName": {
"description": "Name strings that are a person's surname (see RFC4519).",
"type": "string"
},
"emailAddress": {
"description": "Email address of the user.",
"type": "string",
"format": "email"
},
"courses": {
"description": "Courses in this credential",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Name of course",
"type": "string"
}
},
"required": ["name"]
}
},
"issuerName": {
"description": "LE name which issued this credential",
"type": "string"
},
"credentialDescription": {
"description": "Description for this credential",
"type": "string"
},
"credentialId": {
"description": "Id for this credential",
"type": "string"
}
},
"required": [
"id",
"givenName",
"familyName",
"emailAddress",
"courses",
"issuerName",
"credentialDescription",
"credentialId"
]
}
}
}
]
}
# with npm
npm add @cef-ebsi/vcdm1.1-pm2-credential-schema@1.3.0
# with Yarn
yarn add @cef-ebsi/vcdm1.1-pm2-credential-schema@1.3.0
# with pnpm
pnpm add @cef-ebsi/vcdm1.1-pm2-credential-schema@1.3.0
The package exports the schema and its metadata as JavaScript objects:
import { schema, metadata } from "@cef-ebsi/vcdm1.1-pm2-credential-schema";
// you can now use the schema and metadata
In addition, the package exports a TypeScript type corresponding to the schema:
import type { PM2Credential } from "@cef-ebsi/vcdm1.1-pm2-credential-schema";
Copyright (c) 2019 European Commission Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in compliance with the Licence. You may obtain a copy of the Licence at:
Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence.