> 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 Issuance Flow

**Used in:** §4.3 Issuing Credentials, §12.7 Issuance Flow
**Audience:** Issuer, Holder, Backend Developer
**IA ID:** D4

```mermaid
sequenceDiagram
  autonumber
  participant Issuer
  participant Portal
  participant API
  participant DB
  participant SchemaRegistry
  participant Holder
  participant Wallet

  Issuer->>Portal: Open "Issue credential"
  Portal->>API: GET /api/v1/credentials/schemas
  API->>DB: SELECT schemas
  API-->>Portal: schema list
  Issuer->>Portal: Select schema, fill subject + claims
  Portal->>API: POST /api/v1/credentials/issue (RBAC: issuer)
  API->>API: Validate against schema JSON-Schema
  API->>API: Sign VC (Ed25519 / JWT proof)
  API->>DB: INSERT credentials (status=active)
  API->>SchemaRegistry: (optional) anchor credential hash via tx
  API-->>Portal: 201 Created { credential, jwt }
  Portal-->>Issuer: Success — copy / send link
  Portal->>Wallet: Deliver via DIDComm or out-of-band
  Wallet-->>Holder: Notification "New credential"
```

**Reading guide:** Schema validation is mandatory before signing; the on-chain anchor is optional (only when the issuer toggles "Anchor on-chain" in the UI).

***