{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.ishare.eu/v3/common/enveloped-verifiable-credential.json",
  "title": "W3C Enveloped Verifiable Credential",
  "description": "Envelope object for a secured Verifiable Credential as defined by W3C Verifiable Credentials Data Model 2.0. The id is a data URL containing the secured credential, such as a JOSE or SD-JWT envelope.",
  "type": "object",
  "properties": {
    "@context": {
      "oneOf": [
        {
          "type": "string",
          "const": "https://www.w3.org/ns/credentials/v2"
        },
        {
          "type": "array",
          "contains": {
            "const": "https://www.w3.org/ns/credentials/v2"
          },
          "minItems": 1
        }
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^data:application/vc\\+(jwt|sd-jwt),.+$",
      "description": "Data URL containing a secured Verifiable Credential using an enveloping security scheme."
    },
    "type": {
      "type": "string",
      "const": "EnvelopedVerifiableCredential"
    }
  },
  "required": [
    "@context",
    "id",
    "type"
  ],
  "additionalProperties": false
}
