> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.adid.dev/llms.txt.
> For full documentation content, see https://docs.adid.dev/llms-full.txt.

# VC Data Model

IDA implements the [W3C Verifiable Credentials Data Model v2.0](https://www.w3.org/TR/vc-data-model-2.0/) for issuing, holding, and verifying digital credentials on the ADI blockchain.

## Core Concepts

```mermaid
graph LR
    I[Issuer] -->|issues| VC[Verifiable Credential]
    VC -->|held by| H[Holder]
    H -->|presents| VP[Verifiable Presentation]
    VP -->|verified by| V[Verifier]
    I -.->|DID on| BC[ADI Blockchain]
    H -.->|DID on| BC
    V -.->|checks| BC
```

A **Verifiable Credential (VC)** is a tamper-evident credential with a cryptographic proof that can be verified without contacting the issuer.

A **Verifiable Presentation (VP)** is a package of one or more VCs presented to a verifier, signed by the holder.

## Verifiable Credential Structure

```json
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/2018/credentials/examples/v1",
    "https://ida.infinia.io/schemas/university-degree/v1"
  ],
  "id": "urn:uuid:f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "type": ["VerifiableCredential", "UniversityDegreeCredential"],
  "issuer": {
    "id": "did:adi:issuer001...",
    "name": "Massachusetts Institute of Technology"
  },
  "issuanceDate": "2026-03-28T10:00:00Z",
  "expirationDate": "2030-12-31T23:59:59Z",
  "credentialSubject": {
    "id": "did:adi:holder001...",
    "degree": {
      "type": "BachelorDegree",
      "name": "Bachelor of Science in Computer Science",
      "university": "MIT",
      "graduationYear": 2025,
      "gpa": 3.8
    }
  },
  "credentialStatus": {
    "id": "https://ida.infinia.io/credentials/status/1#3",
    "type": "StatusList2021Entry",
    "statusPurpose": "revocation",
    "statusListIndex": "3",
    "statusListCredential": "https://ida.infinia.io/credentials/status/1"
  },
  "credentialSchema": {
    "id": "did:adi:schema:university-degree-v1",
    "type": "JsonSchemaValidator2018"
  },
  "proof": {
    "type": "Ed25519Signature2020",
    "created": "2026-03-28T10:00:00Z",
    "verificationMethod": "did:adi:issuer001...#key-1",
    "proofPurpose": "assertionMethod",
    "proofValue": "z58DAdFfa9SkqZMVPxAQpic7ndTn4..."
  }
}
```

## Property Reference

| Property            | Required    | Description                                                       |
| ------------------- | ----------- | ----------------------------------------------------------------- |
| `@context`          | Yes         | JSON-LD context URIs defining the terms used                      |
| `id`                | Recommended | Unique identifier for the credential (UUID URN)                   |
| `type`              | Yes         | Array including `VerifiableCredential` plus specific types        |
| `issuer`            | Yes         | DID of the issuing entity (string or object with `id` and `name`) |
| `issuanceDate`      | Yes         | ISO 8601 timestamp of credential issuance                         |
| `expirationDate`    | No          | ISO 8601 timestamp after which the credential is invalid          |
| `credentialSubject` | Yes         | Claims about the subject, includes subject's DID as `id`          |
| `credentialStatus`  | No          | Reference to revocation/status mechanism                          |
| `credentialSchema`  | No          | Reference to the schema the credential conforms to                |
| `proof`             | Yes         | Cryptographic proof (signature) from the issuer                   |

## Proof Types

IDA supports multiple proof suites:

| Proof Type                    | Algorithm | Selective Disclosure | Use Case                       |
| ----------------------------- | --------- | -------------------- | ------------------------------ |
| `Ed25519Signature2020`        | EdDSA     | No                   | Standard VC signing            |
| `EcdsaSecp256k1Signature2019` | ECDSA     | No                   | Blockchain-native VCs          |
| `BbsBlsSignature2020`         | BBS+      | Yes                  | Privacy-preserving VCs         |
| `BbsBlsSignatureProof2020`    | BBS+      | Yes                  | Derived proofs (presentations) |

### Ed25519 Proof

```json
{
  "type": "Ed25519Signature2020",
  "created": "2026-03-28T10:00:00Z",
  "verificationMethod": "did:adi:issuer001...#key-1",
  "proofPurpose": "assertionMethod",
  "proofValue": "z58DAdFfa9SkqZMVPxAQpic7ndTn4..."
}
```

### BBS+ Proof (Selective Disclosure)

```json
{
  "type": "BbsBlsSignature2020",
  "created": "2026-03-28T10:00:00Z",
  "verificationMethod": "did:adi:issuer001...#bbs-key-1",
  "proofPurpose": "assertionMethod",
  "proofValue": "ABcD1234..."
}
```

## Verifiable Presentation

A holder wraps one or more VCs in a Verifiable Presentation:

```json
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1"
  ],
  "type": ["VerifiablePresentation"],
  "holder": "did:adi:holder001...",
  "verifiableCredential": [
    {
      "@context": ["..."],
      "type": ["VerifiableCredential", "UniversityDegreeCredential"],
      "issuer": "did:adi:issuer001...",
      "credentialSubject": { "..." },
      "proof": { "..." }
    }
  ],
  "proof": {
    "type": "Ed25519Signature2020",
    "created": "2026-03-28T11:00:00Z",
    "verificationMethod": "did:adi:holder001...#key-1",
    "proofPurpose": "authentication",
    "challenge": "abc123-verifier-nonce",
    "domain": "https://verifier.example.com",
    "proofValue": "z4Abc123..."
  }
}
```

### Presentation with Selective Disclosure

When using BBS+, the holder can derive a proof revealing only specific attributes:

```json
{
  "@context": ["https://www.w3.org/2018/credentials/v1"],
  "type": ["VerifiablePresentation"],
  "holder": "did:adi:holder001...",
  "verifiableCredential": [
    {
      "@context": ["..."],
      "type": ["VerifiableCredential", "UniversityDegreeCredential"],
      "issuer": "did:adi:issuer001...",
      "credentialSubject": {
        "id": "did:adi:holder001...",
        "degree": {
          "type": "BachelorDegree",
          "university": "MIT"
        }
      },
      "proof": {
        "type": "BbsBlsSignatureProof2020",
        "created": "2026-03-28T11:00:00Z",
        "verificationMethod": "did:adi:issuer001...#bbs-key-1",
        "proofPurpose": "assertionMethod",
        "nonce": "verifier-nonce-xyz",
        "proofValue": "DerivedProof123..."
      }
    }
  ],
  "proof": { "..." }
}
```

In this example, only `degree.type` and `university` are revealed. The `name`, `graduationYear`, and `gpa` remain hidden.

## JSON-LD Contexts

IDA uses the following JSON-LD contexts:

| Context                                            | Purpose                |
| -------------------------------------------------- | ---------------------- |
| `https://www.w3.org/2018/credentials/v1`           | W3C VC base context    |
| `https://w3id.org/security/suites/ed25519-2020/v1` | Ed25519 proof suite    |
| `https://w3id.org/security/bbs/v1`                 | BBS+ proof suite       |
| `https://ida.infinia.io/schemas/{name}/v{n}`       | IDA credential schemas |
| `https://ida.infinia.io/ns/agent/v1`               | Agent delegation VCs   |

## Credential Types

IDA provides built-in credential types:

| Type                          | Schema ID                             | Use Case   |
| ----------------------------- | ------------------------------------- | ---------- |
| `UniversityDegreeCredential`  | `did:adi:schema:university-degree-v1` | Education  |
| `KYCVerifiedCredential`       | `did:adi:schema:kyc-verified-v1`      | Finance    |
| `VaccinationRecordCredential` | `did:adi:schema:vaccination-v1`       | Healthcare |
| `AddressProofCredential`      | `did:adi:schema:address-proof-v1`     | Identity   |
| `AgentDelegationCredential`   | `did:adi:schema:agent-delegation-v1`  | AI Agents  |
| `AgentCapabilityCredential`   | `did:adi:schema:agent-capability-v1`  | AI Agents  |
| `AgentComplianceCredential`   | `did:adi:schema:agent-compliance-v1`  | AI Agents  |

## Verification Checks

When verifying a VC or VP, IDA performs these checks:

| Check                 | Description                                          |
| --------------------- | ---------------------------------------------------- |
| **Proof Integrity**   | Cryptographic signature is valid                     |
| **Issuer DID**        | Issuer DID resolves and is not deactivated           |
| **Signing Key**       | Verification method exists in issuer's DID Document  |
| **Schema Compliance** | Credential conforms to its declared schema           |
| **Expiration**        | Current time is before `expirationDate`              |
| **Revocation**        | Credential is not in the revocation registry         |
| **Holder Binding**    | VP is signed by the holder listed in the VC          |
| **Challenge/Domain**  | VP challenge and domain match the verifier's request |