<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->

# API Reference — Implementing Decentralized Identity

## Decentralized Identity APIs

### W3C DID Resolution

| Endpoint | Description |
|---|---|
| `GET /1.0/identifiers/{did}` | Resolve a DID document |
| `GET /1.0/identifiers/{did}?versionId={id}` | Resolve specific version |

### Verifiable Credentials API

| Operation | Method | Description |
|---|---|---|
| Issue | `POST /credentials/issue` | Issue a new VC |
| Verify | `POST /credentials/verify` | Verify a VC |
| Present | `POST /presentations/prove` | Create VP |
| Verify VP | `POST /presentations/verify` | Verify a VP |
| Revoke | `POST /credentials/status` | Update revocation status |

### Agent Script

```bash
# Generate DID
node agent.js generate-did --method web --domain example.com

# Issue credential
node agent.js issue --issuer did:web:issuer.com --subject did:web:user.com --type EmployeeCredential

# Verify presentation
node agent.js verify --presentation presentation.json
```
