Skip to content

Latest commit

 

History

History
83 lines (64 loc) · 8.6 KB

vc.md

File metadata and controls

83 lines (64 loc) · 8.6 KB

W3C Verifiable Credentials v1.1

The VC Data Model provides optionality for many of its properties. This means they can take on multiple concrete types, for example an issuer property can either be repreesnted as a JSON string representing a URI or a JSON object that must contain an id property. Additionally, the data model follows an open world model for extensibility via the usage of JSON-LD. As a consequence, conformant Verifiable Credentials may contain properties that are not defined by the specification itself, but by JSON-LD Contexts.

This optionality can be difficult to implement consistently across languages. As a consequence, this specification defines a strict subset of the VC Data Model v1.1 that supports the plain JSON syntax, represented by the following table. As a utility JSON Schemas for Verifiable Credentials and Verifiable Presentations are provided to aid in the validation of conformant documents.

Verifiable Credential Data Model

Following from this data model.

Property JSON Representation Required Notes
@context Array of strings Yes Contexts defining the meaning of terms within the credential. Must include at least "https://www.w3.org/2018/credentials/v1".
id String Yes A URI representing a unique identifier for the credential. Recommended to be of form urn:uuid:3978344f-8596-4c3a-a978-8fcaba3903c5.
type Array of strings Yes Type(s) of the credential. Must include VerifiableCredential.
issuer String OR Object Yes Recommended to be a string; a DID representing a unique identifier for the entity that issued the credential. We also need to support the case where issuer is a JSON Object with an id propertery (following prior guidance) and a name property representing the Issuer's name.
issuanceDate String Yes XML Datetime value for when the credential was issued.
expirationDate String No XML Datetime value after which the credential is no longer valid.
credentialSubject Object Yes Data about the subject of the credential. Can be any JSON object.
credentialSubject.id String Yes A DID representing a unique identifier for whom the credential's claims are made.
credentialStatus Object defined by Credential Status No Only to be used with Status List 2021.
credentialSchema Object defined by Credential Schema No Recommended. Only to be used with the type JsonSchema.
evidence Array of objects No An array of JSON objects as per Evidence.

Additional Notes:

  • The credentialSubject property can be any JSON object. It is recommended that this object is defined by an associated credentialSchema.
  • No JSON-LD processing is performed.
  • Embedded proofs, using the proof property must not be present. JWTs with the proof property present must not be processed.
  • The type property must always contain VerifiableCredential but may also contain the URI(s) of a JSON Schema, if one is used for the credential.
  • We do not support multiple credential subjects.
  • Verifiable Credentials must be secured as JWTs according to the rules laid out in the specification.
  • XML Datetime values may be represented by conforming to ISO8601 or RFC3339 formats, as they are subsets of XML Datetime.
  • For the evidence property no further implementation is needed until we are able to specify an evidence type, such as those provided by this registry.

Credential Status Data Model

Following from this data model.

StatusList2021Entry

Property JSON Representation Required Notes
id String Yes A URL which uniquely identifies the status of the associated verifiable credential.
type String Yes Must be set to StatusList2021Entry.
statusPurpose String Yes Describes the type of status the object represents (e.g. revocation or suspension).
statusListIndex String Yes An integer >= 0 expressed as a string that identifies the bit position of the status of the associated verifiable credential.
statusListCredential String Yes A URL which uniquely identifies a verifiable credential whose type is StatusList2021Credential.

Additional Notes:

  • When representing Status List Credentials, as opposed to including a status in another VC, the Status List Credential must follow the guidance here.

Credential Schema Data Model

Following from this data model.

Property JSON Representation Required Notes
id String Yes A URL which uniquely identifies the JSON Schema for the associated Verifiable Credential.
type String Yes Must be set to JsonSchema.

Additional Notes:

  • Although the referenced spec is designed for v2 of the VC Data Model, we apply it to v1.1 as a standard means to implement the credentialSchema.

Verifiable Presentation Data Model

Following from this guidance, which extends on the data model above.

Property JSON Representation Required Notes
@context Array of strings Yes Contexts defining the meaning of terms within the presentation. Must include at least "https://www.w3.org/2018/credentials/v1".
id String Yes A URI representing a unique identifier for the presentation. Recommended to be of form urn:uuid:3978344f-8596-4c3a-a978-8fcaba3903c5.
type Array of strings Yes Type(s) of the presentation. Must include VerifiablePresentation.
holder String Yes A DID representing a unique identifier for the entity that created the presentation.
issuanceDate String Yes XML Datetime value for when the presentation was created.
expirationDate String No XML Datetime value after which the presentation is no longer valid.
verifiableCredential Array of strings Yes An array with at least one value, containing the JWT representation of Verifiable Credential objects.

Additional Notes:

  • No JSON-LD processing is performed.
  • Embedded proofs, using the proof property must not be present.
  • The type property must always contain VerifiablePresentation but may also contain the URI(s) of a JSON Schema, if one is used for the presentation.
  • Verifiable Presentations must be secured as JWTs according to the rules laid out in the specification.
  • XML Datetime values may be represented by conforming to ISO8601 or RFC3339 formats, as they are subsets of XML Datetime.