Message Formats

Credentials

Verifiable Credential

The following represents the intermediate form of a JWT-encoded verifiable credential post-verification and post-decoding to restore the "credential" (i.e., combining fields from both the payload and the protected headers of the JWT token):

{
  "credentialSubject": {
    "KYCAMLAttestation": {
      "type": "KYCAMLAttestation",
      "process": "https://dwn.vc/definitions/processes/kycaml/0.0.1/usa",
      "approvalDate": "2022-04-01T00:00:00.000Z"
    },
    "id": "did:key:z6Mkj19pGYpv88SCYZW8ZT1dxrKYJrPf6u6hBeGexChJF4qp"
  },
  "issuer": {
    "id": "did:web:dwn.id"
  },
  "type": ["VerifiableCredential", "KYCAMLAttestation"],
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    { "@vocab": "https://dwn.id/identity/" }
  ],
  "issuanceDate": "2022-04-01T00:00:00.000Z",
}

Verifiable Credential with status

The following represents the intermediate form of a DID JWT-encoded verifiable credential post-verification and post-decoding to restore the "credential" (i.e., combining fields from both the payload and the protected headers of the JWT token). Note that the credential status has not been dereferenced (i.e., "fetched" as a bit string and validated), which some systems might want to do before processing and/or storing the credential.

Issuance

Credential Offer

Our Credential Offer structure is a simple JWM wrapper around a DIF Credential Manifest.

Parameters:

  • from: who the message is from; in this case, the issuer

  • reply_url: the URL the wallet should send the credential application to

  • body.challenge: a challenge the wallet should sign when proving control, to prevent replays

  • body.manifest: this follows the DIF Credential Manifest spec

Credential Manifest

Example DIF Credential Manifest for a KYCAMLAttestation issued by a fictional issuer, Example Inc. Notice the descriptive text found in the output descriptors, which can be used by wallets to render details about the credential being issued. The presentation definition describes the inputs necessary to receive a credential. In this case, it is a Verifiable Presentation with no credentials, which is sufficient to prove control over the presentation holder's did.

Credential Application

What follows is a JSON object containing the same contents as a Verifiable Presentation in DID JWT form; there is no proof object, because it would be signed and transmitted as a JWT.

Credential Fulfillment

What follows is a JSON object containing the same contents as a Verifiable Presentation in JWT form; there is no proof object, because it would be signed and transmitted as a JWT.

Presentation Exchange

Presentation Request

Parameters:

  • from: who the message is from; in this case, the issuer

  • reply_url: the URL the wallet should send the credential submission to

  • body.challenge: a challenge the wallet should sign when proving control, to prevent replays

  • body.presentation_definition: this follows the DIF Presentation Definition spec

  • body.status_url: url returning verification results when complete

Presentation Submission

Response

Last updated