---
# System prepended metadata

title: 'Credential Data Model: Existing vs Next'

---

# Credential Data Model: Existing vs Next

## Indy Schema -> SchemaOrg style

```json
{
    "name": ""
}
```

https://schema.org/NewsMediaOrganization



## Credential Definition -> Credental Manifest

https://identity.foundation/credential-manifest/

```json
{
  "locale": "en-US",
  "issuer": {
    "id": "did:example:123",
    "name": "Washington State Government",
    "styles": {
      "thumbnail": {
        "uri": "https://dol.wa.com/logo.png",
        "alt": "Washington State Seal"
      },
      "hero": {
        "uri": "https://dol.wa.com/people-working.png",
        "alt": "People working on serious things"
      },
      "background": {
        "color": "#ff0000"
      },
      "text": {
        "color": "#d4d400"
      }
    }
  },
  "credential": {
    "schema": "https://schema.org/EducationalOccupationalCredential",
    "display": {
      "title": {
        "path": ["$.name", "$.vc.name"],
        "text": "Washington State Driver License"
      },
      "subtitle": {
        "path": ["$.class", "$.vc.class"],
        "text": "Class A, Commercial"
      },
      "description": {
        "text": "License to operate a vehicle with a gross combined weight rating (GCWR) of 26,001 or more pounds, as long as the GVWR of the vehicle(s) being towed is over 10,000 pounds."
      },
      "properties": [
        {
          "path": ["$.donor", "$.vc.donor"],
          "label": "Organ Donor"
        }
      ]
    },
    "styles": {
      "thumbnail": {
        "uri": "https://dol.wa.com/logo.png",
        "alt": "Washington State Seal"
      },
      "hero": {
        "uri": "https://dol.wa.com/happy-people-driving.png",
        "alt": "Happy people driving"
      },
      "background": {
        "color": "#ff0000"
      },
      "text": {
        "color": "#d4d400"
      }
    }
  },
  "presentation_definition": {
    // As defined in the Presentation Exchange specification
  }
}
```

## Credential Issuance: Old vs New

https://w3c-ccg.github.io/ld-proofs/#
https://www.w3.org/TR/vc-data-model/#claims

```json
{
  // set the context, which establishes the special terms we will be using
  // such as 'issuer' and 'alumniOf'.
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/2018/credentials/examples/v1"
  ],
  // specify the identifier for the credential
  "id": "http://example.edu/credentials/1872",
  // the credential types, which declare what data to expect in the credential
  "type": ["VerifiableCredential", "AlumniCredential"],
  // the entity that issued the credential
  "issuer": "https://example.edu/issuers/565049",
  // when the credential was issued
  "issuanceDate": "2010-01-01T19:73:24Z",
  // claims about the subjects of the credential
  "credentialSubject": {
    // identifier for the only subject of the credential
    "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
    // assertion about the only subject of the credential
    "alumniOf": {
      "id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
      "name": [{
        "value": "Example University",
        "lang": "en"
      }, {
        "value": "Exemple d'Université",
        "lang": "fr"
      }]
    }
  },
  // digital proof that makes the credential tamper-evident
  // see the NOTE at end of this section for more detail
  "proof": {
    // the cryptographic signature suite that was used to generate the signature
    "type": "RsaSignature2018",
    // the date the signature was created
    "created": "2017-06-18T21:19:10Z",
    // purpose of this proof
    "proofPurpose": "assertionMethod",
    // the identifier of the public key that can verify the signature
    "verificationMethod": "https://example.edu/issuers/keys/1",
    // the digital signature value
    "jws": "eyJhbGciOiJSUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..TCYt5X
      sITJX1CxPCT8yAV-TVkIEq_PbChOMqsLfRoPsnsgw5WEuts01mq-pQy7UJiN5mgRxD-WUc
      X16dUEMGlv50aqzpqh4Qktb3rk-BuQy72IFLOqV0G_zS245-kronKb78cPN25DGlcTwLtj
      PAYuNzVBAh4vGHSrQyHUdBBPM"
  }
}
```

## Proof Request -> Presentation Definition

https://identity.foundation/presentation-exchange/#presentation-definition

```json
{
  // VP, OIDC, DIDComm, or CHAPI outer wrapper
  "presentation_definition": {
    "id": "32f54163-7166-48f1-93d8-ff217bdb0653",
    "input_descriptors": [
      {
        "id": "banking_input",
        "name": "Bank Account Information",
        "purpose": "We need your bank and account information.",
        "schema": [
          {
            "uri": "https://bank-standards.com/customer.json"
          }
        ],
        "constraints": {
          "limit_disclosure": true,
          "fields": [
            {
              "path": ["$.issuer", "$.vc.issuer", "$.iss"],
              "purpose": "The claim must be from one of the specified issuers",
              "filter": {
                "type": "string",
                "pattern": "did:example:123|did:example:456"
              }
            }
          ]
        }
      },
      {
        "id": "citizenship_input",
        "name": "US Passport",
        "schema": [
          {
            "uri": "hub://did:foo:123/Collections/schema.us.gov/passport.json"
          }
        ],
        "constraints": {
          "fields": [
            {
              "path": ["$.credentialSubject.birth_date", "$.vc.credentialSubject.birth_date", "$.birth_date"],
              "filter": {
                "type": "string",
                "format": "date",
                "minimum": "1999-5-16"
              }
            }
          ]
        }

      }
    ]
  }
}
```

## Indy Proof (Verification) -> Presentation Submission

https://identity.foundation/presentation-exchange/#presentation-submission

```json
{
  "presentation_submission": {
    "id": "a30e3b91-fb77-4d22-95fa-871689c322e2",
    "definition_id": "32f54163-7166-48f1-93d8-ff217bdb0653",
    "descriptor_map": [
      { 
        "id": "banking_input_2",
        "format": "jwt_vp",
        "path": "$.outerClaim[0]",
        "path_nested": {
            "id": "banking_input_2",
            "format": "ldp_vc",
            "path": "$.innerClaim[1]",
            "path_nested": {
                "id": "banking_input_2",
                "format": "jwt_vc",
                "path": "$.mostInnerClaim[2]"
            }
        }
    }
  ]
}
```