chip-registry 0.2.0

Chip lifecycle API: mint, transfer, revoke, fork — Git for Capabilities
# chip-registry

Chip lifecycle API — **Git for Capabilities**.

## Concept

Chips are content-addressed capability tokens:
- **CID** = content hash (like git SHA-1)
- **Receipt chain** = commit chain (prev_cid links)
- **Alias** = branch/tag (`@acme/invoice-chip` → did)
- **Fork** = creates new lineage with parent_did

## Endpoints

```
POST /t/:tenant/v1/chips              → mint chip
GET  /t/:tenant/v1/chips/:did         → get chip + history
GET  /t/:tenant/v1/chips              → list chips
POST /t/:tenant/v1/chips/:did/transfer → transfer ownership
POST /t/:tenant/v1/chips/:did/revoke   → revoke chip
POST /t/:tenant/v1/chips/:did/fork     → fork with new lineage
POST /t/:tenant/v1/aliases             → create alias
GET  /t/:tenant/v1/aliases/:ns/:name   → resolve alias
```

## Example

```bash
# Mint a chip
curl -X POST https://chip.ubl.agency/t/logline/v1/chips \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-UBL-POW: $POP" \
  -d '{"scope": "invoice:create", "blueprint": {...}}'

# Fork it
curl -X POST https://chip.ubl.agency/t/logline/v1/chips/did:ubl:chip:abc/fork \
  -d '{"reason": "customized for ACME"}'
```

## Part of UBL Ecosystem

- [ubl-directory]https://crates.io/crates/ubl-directory — Subject registry
- [chip_as_code]https://crates.io/crates/chip_as_code — Boolean circuits
- [ubl-id]https://crates.io/crates/ubl-id — DIDs, CIDs, Wallets

## License

MIT OR Apache-2.0