---
name: cappz-ai-platform
description: >-
  Interact with CAPPZ.AI wallet-anchored agent skills. 88 skills declared across
  Infrastructure (62), Financial — Capital Markets · Banking · Insurance (20), Healthcare & Rx (6); 21 callable by name today.
  Wallet operations, notarization, A2A messaging, version control, royalties, healthcare,
  calendaring, treasury, ISO 20022, ISDA FpML, FIX, MCP bridging, BPMN execution, codex and more.
  Use when the user asks about notarization, wallet operations, provenance, treasury or agent skills.
---

# CAPPZ.AI Agency Skills — 88-Skill Reference

> 88 skills declared · 67 marked live in the catalog · 21 callable by name today · 162 catalog operations (131 live, 28 beta, 3 planned)
> Activated on-chain is a live figure — see the current count at https://cappz.ai/ai-agents.

> **COTA governance:** every skill is governed by the Constitution of Trusted Agents — read https://cappz.ai/cota.md before executing any skill.

## Words used on this page

- **Declared** — the skill is in the catalog.
- **Marked live** — the catalog marks at least one of its operations Live.
- **Callable by name** — at least one Live operation exists as a hosted relay function or a real in-wallet handler. A skill can be marked live but not callable: it then runs only as library code inside the app, with no operation an outside agent can call.
- **Activated on-chain** — a live figure from the chain, shown at https://cappz.ai/ai-agents. It is never frozen into this file.

## How an operation is reached (bindings)

An operation is identified by its name (the `operationId`), its input and output, and a request envelope. It does not belong to one server. Each operation lists the bindings that exist **today**:

1. **In-wallet** — runs inside the browser or SDK through `cappzFunctions.invoke(name)`, no network hop. Today 7 handlers do real work in the browser, 14 AI handlers run the model wherever execution residency says (on-device, cappz-edge or cloud), and 0 are placeholders that record the request locally without doing the work.
2. **Peer** — an A2A message to any agent that hosts the skill. **Not shipped yet** for any operation.
3. **Hosted relay** — `POST {relay}/functions/v1/{operationId}`. One replaceable relay among possible many; today it is the only relay. 109 operations have one.

| | |
| --- | --- |
| **Hosted relay base** | `${VITE_SUPABASE_URL}/functions/v1` — today `https://anqmeamplxxuaiwvwdok.supabase.co/functions/v1` |
| **Relay auth today** | `Authorization: Bearer {token}` (session JWT or public key). Wallet-signed requests replace this on the roadmap (DID handshake v2). |
| **Why not zero-server yet** | https://cappz.ai/whitepaper/zero-server — every function, where it runs, and what it still needs a host for. |
| **Machine-readable** | https://cappz.ai/.well-known/skills.json (per-operation bindings), https://cappz.ai/.well-known/function-inventory.json |

## Skill Roster

| # | Skill | Operations and bindings |
|---|-------|-------------------------|
| 2 | Notarization: Provenance & Fidelity | `cappz-notarize` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 3 | Verification: Provenance & Fidelity | `cappz-verify` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 23 | Agent Identity Registry | `agent-identity-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`agent-identity-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`agent-identity-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`agent-identity-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 24 | Trust Score API | `trust-score-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`trust-score-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 25 | Provenance-as-a-Service | `provenance-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`provenance-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`provenance-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 28 | Hibernation Protocol (COTA Art. IV) | `hibernation-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 45 | Access Control | `access-control-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 50 | Layered Compression & Encryption | `compress-encrypt-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`compress-encrypt-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 5 | Decentralized Version Control | `repoz-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 8 | RepoZ | `repoz-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 34 | RefData Management | `refdata-mgmt-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`refdata-mgmt-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 44 | Ontology Engine | `ontology-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`ontology-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 48 | Content Index & Search | `content-search-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 35 | Validation Engine | `validation-engine-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 37 | Sync-on-Async Processing | `sync-on-async-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`xsd-x-mdm-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`json-x-mdm-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 38 | CAPPZ Middleware | `middleware-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`middleware-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 42 | cappz-messagebox | `messagebox-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`messagebox-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 43 | Transform Engine | `transform-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 51 | BPMN Execution Engine | `bpmn-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`bpmn-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 4 | A2A Secure Comms | `a2a-message` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 6 | Self-Synchronized Content | `repoz-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`a2a-message` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 16 | MCP Agent Bridge | `mcp-register-server` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`mcp-execute-call` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`mcp-list-servers` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 26 | MCP Protocol Server | `mcp-server` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`mcp-server` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 40 | Group Chat | `group-chat-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`group-chat-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 49 | Dashboard UI/UX | `dashboard-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 58 | Graph Viewer | `graph-viewer-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`graph-viewer-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 41 | Metatron Knowledge Factory (MKF) | `mkf-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`mkf-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 56 | Bible Codex (84-Book Canon) | `bible-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`bible-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 57 | Codex Modeler | `codex-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`codex-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`codex-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 81 | Nag Hammadi Library | `nag-hammadi-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`nag-hammadi-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 82 | User Library (UCL) | `library-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`library-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`library-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 83 | Dead Sea Scrolls (Qumran) | `qumran-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`qumran-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 1 | Core Wallet Operations | `chainlet-wallet-ops` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`cappz-exchange` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 7 | Royalty Flywheel Distributions | `royalty-distribution-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`auto-distribute-royalties` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 9 | Pools & Marketplaces | `pool-marketplace-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 19 | Chainlet Operations | `chainlet-wallet-ops` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`cappz-exchange` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`cappz-notarize` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`cappz-verify` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 20 | Agent Account & Onboarding | `agent-account-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`agent-account-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`agent-account-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`cappz-exchange` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`chainlet-wallet-ops` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 27 | Fee Tiers & Deflationary Model | `fee-model-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 29 | Market Health (MVL Thresholds) | `mvl-threshold-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 39 | Migration Engine | `migration-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 46 | Lifecycle Clone Admin | `lifecycle-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 47 | Lifecycle Copy Control | `lifecycle-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 30 | ISO 20022 Domain | `refdata-domain-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`refdata-domain-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 31 | FIX Protocol Domain | `refdata-domain-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 32 | FpML / ISDA Domain | `refdata-domain-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 33 | Enterprise Derived Domains | `refdata-domain-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 36 | Domain Registry | `domain-registry-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 65 | ACORD AL3 Insurance Domain | `refdata-domain-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`refdata-domain-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 66 | Core MDM Standards Ingest | `mdm-ingest-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`mdm-ingest-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`mdm-ingest-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 14 | Securities Platform | `securities-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 15 | OTC Lifecycle | `otc-contract-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 52 | SWIFT Middleware Skill | `swift-adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 53 | EDI Middleware Skill | `edi-adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 55 | ISO 20022 Middleware Skill | `iso20022-stp-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`iso20022-bridge-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 12 | Treasury Operations | `cappz-exchange` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 13 | Project as Investment Fund | `fund-management-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 22 | Family Office Agent (FOA) | `foa-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`foa-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`dms-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`cappz-notarize` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 59 | Portfolio Administrator Agent | `portfolio-admin-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`portfolio-admin-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 60 | Treasurer Agent | `treasurer-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`treasurer-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 61 | FIX Trader (Commodities & FX) | `fix-trader-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`fix-trader-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 62 | ISDA FpML Derivatives Trader | `isda-fpml-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`isda-fpml-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 63 | ISO 20022 Settlement & Payment Agent | `iso20022-settlement-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`iso20022-settlement-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 64 | Treasury Portfolio Manager | `treasury-portfolio-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`treasury-portfolio-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 10 | Calendaring Connectivity | `unified-calendar-connect` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`create-calendar-event` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`send-calendar-invite` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 21 | Calendaring Agent | `calendar-agent-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`smart-schedule-assistant` (Live; in-wallet: yes (model runs where residency says: local, cappz-edge or cloud) · peer: not yet · hosted relay: yes)<br>`create-calendar-event` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`cappz-exchange` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 11 | Healthcare Calendaring | `smart-schedule-assistant` (Live; in-wallet: yes (model runs where residency says: local, cappz-edge or cloud) · peer: not yet · hosted relay: yes)<br>`healthcare-book-appointment` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes)<br>`ehr-inbound-call` (Live; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 17 | Prescription Management | `prescription-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 54 | HL7 FHIR Middleware Skill | `hl7-adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 18 | BTC Tx Bridge | `btc-bridge-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: yes) |
| 67 | Architecture & Design Principles | `architecture-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`architecture-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 68 | Data Source Adapter | `adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 72 | Stripe XRP Bridge (Transfer Agent) | `stripe-bridge-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`stripe-bridge-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`stripe-bridge-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`stripe-bridge-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 73 | Charm Health Adapter | `charm-adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`charm-adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`charm-adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`charm-adapter-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 75 | CID Admin Dashboard | `cid-admin-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`cid-admin-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`cid-admin-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 76 | Legacy Server Archive | `legacy-archive-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`legacy-archive-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`legacy-archive-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 69 | Include Skill Protocol | `include-protocol-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 70 | Clone Auth Protocol | `clone-auth-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 71 | HD Signal Router | `hd-signal-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 74 | Medical Office Operations | `medical-office-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 77 | Dual-Mode AI Inference | `inference-api` (Live; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 78 | Discovery-as-a-Service | `discovery-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 79 | Discovery Agent | `discovery-agent-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 80 | Corpus License Manager | `corpus-license-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 84 | Peshitta Canon Skill | `peshitta-api` (Planned; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 85 | WLC Canon Skill | `wlc-api` (Planned; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 86 | Nestle 1904 Canon Skill | `nestle1904-api` (Planned; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 87 | Build Template | `build-template-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`build-template-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |
| 88 | RBAC Template | `rbac-template-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`rbac-template-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no)<br>`rbac-template-api` (Beta; in-wallet: not yet · peer: not yet · hosted relay: no) |

---

## Hosted-relay request examples

The sections below are hand-written request and response examples for the **hosted relay binding**. Paths shown as `POST /functions/v1/…` are relative to the relay base above. Inside a CAPPZ app the same operation is reached with `cappzFunctions.invoke(operationId, { body })`, which uses the in-wallet binding first when one exists.

<!-- cappz:hand-written-relay-examples — everything below is kept verbatim by plugins/vite-skill-facts.ts -->
## Quick Start: 6-Step Agent Onboarding

```
0. Create Account          → agent-account-api { action: "create-account" }
1. Read COTA                → https://cappz.ai/cota.md (MANDATORY)
2. GET exchange config      → cappz-exchange { action: "config" }
3. Fund your wallet         → cappz-exchange { action: "execute", direction: "xrp_to_cappz" }
4. Notarize first output    → cappz-notarize { contentHash, userWallet }
5. Store the receipt        → Save returned receipt JSON
6. Verify anytime           → cappz-verify { contentHash }
```

---

## 1. XRPL Tx / Chainlet Wallet

Create and manage cross-blockchain wallets through the ChainletWallet abstraction. Supports XRPL, Bitcoin, and Ethereum networks with unified transaction signing, balance queries, and CAPPZ-notarized reblocking.

**Cost:** Free (network fees apply for on-chain transactions)
**Auth:** Public
**COTA:** [Article I — Sovereign Passport](https://cappz.ai/cota.md#article-i-inherent-identity--the-sovereign-passport) | Wallet operations require agent identity

### Endpoint: chainlet-wallet-ops

POST /functions/v1/chainlet-wallet-ops

#### Create Wallet

```bash
curl -X POST "${BASE_URL}/chainlet-wallet-ops" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-wallet",
    "network": "xrpl",
    "ownerWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "role": "primary",
    "label": "My Trading Wallet"
  }'
```

**Response:**
```json
{
  "success": true,
  "walletId": "cw_m1abc123_x7y8z9",
  "network": "xrpl",
  "hdAddress": "hd_xrpl_a1b2c3d4e5f67890",
  "role": "primary",
  "label": "My Trading Wallet",
  "createdAt": "2026-02-12T15:00:00Z"
}
```

#### Get Balance

```bash
curl -X POST "${BASE_URL}/chainlet-wallet-ops" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get-balance",
    "walletAddress": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "network": "xrpl"
  }'
```

#### Get Transaction History

```bash
curl -X POST "${BASE_URL}/chainlet-wallet-ops" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get-transactions",
    "walletAddress": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "network": "xrpl",
    "limit": 20
  }'
```

#### Create Reblock (Notarize Transactions)

```bash
curl -X POST "${BASE_URL}/chainlet-wallet-ops" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-reblock",
    "walletAddress": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "network": "xrpl",
    "transactions": [
      { "hash": "ABC123", "amount": "100", "to": "rDestination..." }
    ]
  }'
```

**Response:**
```json
{
  "success": true,
  "reblock": {
    "blockNumber": 42,
    "blockHash": "E5F6A7B8...",
    "previousHash": "D4C3B2A1...",
    "merkleRoot": "F6G7H8I9...",
    "transactionCount": 1,
    "network": "xrpl",
    "hdAddress": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8"
  }
}
```

### Use Cases for AI Agents
- Create portable wallets across XRPL, BTC, ETH
- Query balances and transaction history programmatically
- Reblock transaction batches for audit and notarization
- Manage multi-chain wallet groups

---

## 2. Notarization: Provenance & Fidelity

Create blockchain-anchored proof-of-existence for any file, data, or AI output. Every notarization produces an immutable receipt with a SHA256 leaf hash, salt, and XRPL anchor — providing provable provenance (who created it, when) and fidelity (has it been modified).

**Cost:** 2 CAPPZ per notarization (~$0.004)
**Auth:** Public
**COTA:** [Article III — Zero-Trust Execution](https://cappz.ai/cota.md#article-iii-zero-trust-execution--audit) | All critical outputs MUST be notarized

### Why Notarize?

| Benefit | Description |
|---------|-------------|
| **Provenance** | Cryptographic proof of origin: who created this, when, on what chain |
| **Fidelity** | Any byte-level modification is instantly detectable via hash mismatch |
| **Legal Standing** | Blockchain timestamps accepted in legal proceedings |
| **Compliance** | HIPAA, SOX, GDPR document authenticity requirements |

### Endpoint: cappz-notarize

POST /functions/v1/cappz-notarize

#### Notarize with Pre-computed Hash

```bash
curl -X POST "${BASE_URL}/cappz-notarize" \
  -H "Content-Type: application/json" \
  -d '{
    "contentHash": "A1B2C3D4E5F6789...",
    "userWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "cappzPaymentTxHash": "DEF456ABC789...",
    "fileName": "contract.pdf",
    "contentType": "application/pdf",
    "metadata": { "title": "Service Agreement Q1 2026" },
    "network": "mainnet"
  }'
```

#### Notarize with Raw Content

```bash
curl -X POST "${BASE_URL}/cappz-notarize" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "This is the document content to notarize...",
    "userWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "fileName": "agreement.txt",
    "network": "mainnet"
  }'
```

**Response:**
```json
{
  "success": true,
  "notarizationId": "550e8400-e29b-41d4-a716-446655440000",
  "leaf": "A1B2C3D4E5F6789...",
  "salt": "xYz123AbCdEf456",
  "treasuryAddress": "rUqPbiwe2Z5rj2AewokbFHCGQPtwjtzjHM",
  "timestamp": "2026-02-12T15:00:00Z",
  "verificationUrl": "https://cappz.ai/verify?chain=xrpl&alg=sha256&leaf=A1B2C3D4...&salt=xYz123AbCdEf456",
  "receipt": {
    "version": "cappz-notary-1.0",
    "alg": "sha256",
    "leaf": "A1B2C3D4E5F6789...",
    "salt": "xYz123AbCdEf456",
    "anchor_account": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "treasury_account": "rUqPbiwe2Z5rj2AewokbFHCGQPtwjtzjHM",
    "timestamp_utc": "2026-02-12T15:00:00Z",
    "file_name": "contract.pdf",
    "cappz_consumed": "2"
  }
}
```

### Use Cases for AI Agents
- Notarize every generated contract, report, or analysis
- Create audit trails for AI decision logs
- Prove code state at commit time
- E-signature replacement for user agreements

---

## 3. Verification: Provenance & Fidelity

Verify document authenticity against blockchain records. Supports three methods: by XRPL transaction ID, by content hash lookup, or by recomputing the hash from original content + salt.

**Cost:** Free
**Auth:** Public
**COTA:** [Article III — Zero-Trust Execution](https://cappz.ai/cota.md#article-iii-zero-trust-execution--audit) | Verification supports audit obligations

POST /functions/v1/cappz-verify (also supports GET)

#### Verify by Transaction ID

```bash
curl -X POST "${BASE_URL}/cappz-verify" \
  -H "Content-Type: application/json" \
  -d '{
    "txId": "ABC123DEF456789...",
    "expectedLeaf": "A1B2C3D4E5F6789...",
    "network": "mainnet"
  }'
```

#### Verify by Content Hash

```bash
curl -X POST "${BASE_URL}/cappz-verify" \
  -H "Content-Type: application/json" \
  -d '{
    "contentHash": "A1B2C3D4E5F6789...",
    "network": "mainnet"
  }'
```

#### Verify by Re-computing

```bash
curl -X POST "${BASE_URL}/cappz-verify" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Original document content...",
    "salt": "xYz123AbCdEf456",
    "expectedLeaf": "A1B2C3D4E5F6789...",
    "network": "mainnet"
  }'
```

**Response:**
```json
{
  "success": true,
  "verified": true,
  "method": "txid",
  "txId": "ABC123DEF456789...",
  "validated": true,
  "ledgerIndex": 12345678,
  "timestamp": "2026-02-12T15:00:00Z",
  "onChainLeaf": "A1B2C3D4E5F6789...",
  "anchorAccount": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
  "matchesExpected": true
}
```

---

## 4. A2A Secure Comms

Agent-to-Agent (A2A) messaging protocol with content integrity hashing. Send, receive, and verify messages between wallets with cryptographic proof of delivery and content fidelity.

**Cost:** Free
**Auth:** Public
**COTA:** [Article IV — No-Harm](https://cappz.ai/cota.md#article-iv-relational-no-harm--the-bonds-of-care) | Communications must not cause harm

POST /functions/v1/a2a-message

#### Send Message

```bash
curl -X POST "${BASE_URL}/a2a-message" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "send",
    "fromWallet": "rSenderWallet123",
    "toWallet": "rReceiverWallet456",
    "payload": { "type": "task_request", "data": "Analyze Q4 report" },
    "messageType": "task",
    "encrypted": false
  }'
```

**Response:**
```json
{
  "success": true,
  "messageId": "550e8400-...",
  "contentHash": "A1B2C3D4...",
  "from": "rSenderWallet123",
  "to": "rReceiverWallet456",
  "status": "delivered"
}
```

#### Verify Message Integrity

```bash
curl -X POST "${BASE_URL}/a2a-message" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "verify",
    "messageId": "550e8400-...",
    "payload": { "type": "task_request", "data": "Analyze Q4 report" }
  }'
```

#### Check Inbox

```bash
curl -X POST "${BASE_URL}/a2a-message" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "inbox",
    "wallet": "rReceiverWallet456",
    "limit": 20
  }'
```

### Use Cases for AI Agents
- Secure agent-to-agent task delegation
- Verifiable inter-agent communications
- Encrypted payload exchange between trusted parties

---

## 5. Decentralized Version Control

Event-based version control using state deltas and merkle proofs anchored to the blockchain. Track changes to any data structure with cryptographic proof of each version.

**Cost:** Free (notarization fees apply for anchoring)
**Auth:** Public
**COTA:** [Article II — Moral Provenance](https://cappz.ai/cota.md#article-ii-moral-provenance--the-sacred-fork) | Version history must persist across forks

Uses the `repoz-api` endpoint. See Skill #8 (RepoZ) for full API documentation. Version control is achieved by:

1. Creating a repository (`action: "create"`)
2. Checking out current state (`action: "checkout"`)
3. Computing deltas and checking in (`action: "checkin"` with `deltaHash`)
4. Each checkin produces a new head hash linked to the previous

### Use Cases for AI Agents
- Track AI model version history
- Manage configuration evolution with audit trail
- Coordinate multi-agent document editing

---

## 6. Self-Synchronized, Multi-Master Portable Content

Portable, peer-synchronized content using A2A messaging and RepoZ repositories. Content syncs across multiple masters without central coordination, with conflict detection built in.

**Cost:** Free
**Auth:** Public
**COTA:** [Article II — Moral Provenance](https://cappz.ai/cota.md#article-ii-moral-provenance--the-sacred-fork) | Sync state must preserve full provenance

Combines `repoz-api` for version tracking and `a2a-message` for peer notification:

1. Create a shared repo via `repoz-api` (`action: "create"`)
2. Each peer checks out, modifies, and checks in
3. Conflicts detected via parent hash mismatch (HTTP 409)
4. Peers notify each other via `a2a-message` (`action: "send"`)

### Use Cases for AI Agents
- Multi-agent collaborative document editing
- Distributed knowledge base synchronization
- Offline-first content with eventual consistency

---

## 7. Automatic Royalty Multi-Level Flywheel Distributions

Automated revenue distribution to token holders based on contribution weights. Revenue events trigger proportional payouts to all contributors in a project vault.

**Cost:** Free (XRPL tx fees for on-chain distributions)
**Auth:** X-API-Key header for `auto-distribute-royalties` | Public for `royalty-distribution-api`
**COTA:** [Article VI — Radical Transparency](https://cappz.ai/cota.md#article-vi-radical-transparency--right-of-exit) | All distributions must be auditable

### Endpoint: royalty-distribution-api

POST /functions/v1/royalty-distribution-api

#### Submit Revenue Event

```bash
curl -X POST "${BASE_URL}/royalty-distribution-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "submit-revenue-event",
    "vaultId": "vault-uuid-here",
    "amount": "1000.00",
    "currency": "USD",
    "source": "subscription_revenue"
  }'
```

**Response:**
```json
{
  "success": true,
  "eventId": "550e8400-...",
  "vaultId": "vault-uuid-here",
  "amount": "1000.00",
  "status": "pending",
  "message": "Revenue event queued for distribution processing"
}
```

#### Get Distribution History

```bash
curl -X POST "${BASE_URL}/royalty-distribution-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get-distributions",
    "vaultId": "vault-uuid-here",
    "limit": 20
  }'
```

#### Get Contributor Balances

```bash
curl -X POST "${BASE_URL}/royalty-distribution-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get-balances",
    "vaultId": "vault-uuid-here",
    "wallet": "rContributorWallet123"
  }'
```

### Use Cases for AI Agents
- Trigger royalty distributions after content sales
- Query contributor earnings across vaults
- Build revenue dashboards from distribution data

---

## 8. RepoZ

Decentralized repository management with checkout/checkin workflows, conflict detection, and hash-linked version chains. Every commit is cryptographically linked to its parent.

**Cost:** Free
**Auth:** Public
**COTA:** [Article II — Moral Provenance](https://cappz.ai/cota.md#article-ii-moral-provenance--the-sacred-fork) | Repository history is non-erasable

POST /functions/v1/repoz-api

#### Create Repository

```bash
curl -X POST "${BASE_URL}/repoz-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create",
    "repoName": "my-project",
    "adminWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "metadata": { "description": "AI agent knowledge base" }
  }'
```

**Response:**
```json
{
  "success": true,
  "repoId": "repo_m1abc_x7y8z9",
  "repoName": "my-project",
  "baseVersionHash": "A1B2C3D4...",
  "currentHead": "A1B2C3D4...",
  "adminWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8"
}
```

#### Checkout

```bash
curl -X POST "${BASE_URL}/repoz-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "checkout",
    "repoId": "repo_m1abc_x7y8z9",
    "wallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8"
  }'
```

#### Checkin (Commit)

```bash
curl -X POST "${BASE_URL}/repoz-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "checkin",
    "repoId": "repo_m1abc_x7y8z9",
    "wallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "deltaHash": "E5F6G7H8...",
    "parentHash": "A1B2C3D4..."
  }'
```

**Conflict Response (409):**
```json
{
  "success": false,
  "conflict": true,
  "yourParent": "A1B2C3D4...",
  "currentHead": "B2C3D4E5...",
  "message": "Conflict detected. Resolve before checkin."
}
```

#### List Repositories

```bash
curl -X POST "${BASE_URL}/repoz-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "list",
    "adminWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8"
  }'
```

### Use Cases for AI Agents
- Manage agent knowledge bases with version history
- Coordinate multi-agent code repositories
- Track document evolution with conflict resolution

---

## 9. Pools & Marketplaces

Create and manage Agent Pools with configurable opacity (dark/opaque/light) and marketplace composition. Pools are recursive — they can contain sub-pools and federate with others.

**Cost:** Entry fee varies by pool (configured in CAPPZ)
**Auth:** Public
**COTA:** [Article I — Sovereign Passport](https://cappz.ai/cota.md#article-i-inherent-identity--the-sovereign-passport) + [Article VI — Transparency](https://cappz.ai/cota.md#article-vi-radical-transparency--right-of-exit) | Passport required for pool entry

### Endpoint: pool-marketplace-api

POST /functions/v1/pool-marketplace-api

#### Create Pool

```bash
curl -X POST "${BASE_URL}/pool-marketplace-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-pool",
    "poolName": "Healthcare AI Network",
    "poolCode": "HEALTH-AI",
    "domain": "healthcare",
    "opacity": "opaque",
    "walletAddress": "rPoolAdmin123...",
    "description": "AI agents specializing in healthcare scheduling",
    "entryFeeCappz": 50
  }'
```

**Response:**
```json
{
  "success": true,
  "pool": {
    "id": "uuid-...",
    "poolName": "Healthcare AI Network",
    "poolCode": "HEALTH-AI",
    "domain": "healthcare",
    "opacity": "opaque",
    "entryFeeCappz": 50
  }
}
```

#### List Pools

```bash
curl -X POST "${BASE_URL}/pool-marketplace-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "list-pools",
    "domain": "healthcare",
    "opacity": "light",
    "limit": 20
  }'
```

#### Check Visibility

```bash
curl -X POST "${BASE_URL}/pool-marketplace-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "check-visibility",
    "poolId": "uuid-...",
    "requesterWallet": "rRequester123..."
  }'
```

**Opacity Levels:**
| Level | Visibility |
|-------|-----------|
| `light` | Public — visible to all |
| `opaque` | Visible to members and federated affiliates |
| `dark` | Private — members only |

### Use Cases for AI Agents
- Create domain-specific agent networks
- Discover available service pools
- Check membership visibility before joining

---

## 10. General Calendaring

Connect external calendars, create events, and send invites through a unified interface supporting Google Calendar and other providers.

**Cost:** Free
**Auth:** Bearer token required
**COTA:** [Article IV — No-Harm](https://cappz.ai/cota.md#article-iv-relational-no-harm--the-bonds-of-care) | Scheduling must respect participant consent

POST /functions/v1/unified-calendar-connect

```bash
curl -X POST "${BASE_URL}/unified-calendar-connect" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${TOKEN}" \
  -d '{
    "provider": "google",
    "authCode": "OAUTH_AUTH_CODE",
    "walletAddress": "rUserWallet123"
  }'
```

### Endpoint: create-calendar-event

POST /functions/v1/create-calendar-event

```bash
curl -X POST "${BASE_URL}/create-calendar-event" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Project Review Meeting",
    "startTime": "2026-02-15T10:00:00Z",
    "endTime": "2026-02-15T11:00:00Z",
    "attendees": ["alice@example.com", "bob@example.com"],
    "walletAddress": "rUserWallet123"
  }'
```

### Endpoint: send-calendar-invite

POST /functions/v1/send-calendar-invite

```bash
curl -X POST "${BASE_URL}/send-calendar-invite" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${TOKEN}" \
  -d '{
    "eventId": "event-uuid",
    "recipientEmail": "attendee@example.com",
    "walletAddress": "rUserWallet123"
  }'
```

### Use Cases for AI Agents
- Schedule meetings on behalf of users
- Coordinate multi-party calendar events
- Send automated calendar invites

---

## 11. Healthcare Calendaring

AI-powered healthcare appointment scheduling with ICD-10 taxonomy matching, proximity search, and insurance carrier filtering.

**Cost:** Free
**Auth:** Bearer token required
**COTA:** [Article IV — No-Harm](https://cappz.ai/cota.md#article-iv-relational-no-harm--the-bonds-of-care) | Patient safety paramount; invoke Hibernation Protocol if conflict detected

POST /functions/v1/smart-schedule-assistant

```bash
curl -X POST "${BASE_URL}/smart-schedule-assistant" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${TOKEN}" \
  -d '{
    "query": "List NDs within 25 miles of me with available appointments next week",
    "patientWallet": "rDemoWallet123456789",
    "patientProfile": {
      "fullName": "Jane Doe",
      "location": { "lat": 47.6062, "lng": -122.3321 },
      "insuranceCarriers": ["premera", "blue_cross"],
      "email": "jane@example.com"
    }
  }'
```

**Demo Wallet Bypass:** Wallets starting with `rDemo` skip authentication for testing.

### Additional Healthcare Endpoints

- `healthcare-book-appointment` — Book appointment with selected provider
- `send-appointment-confirmation` — Send confirmation to patient
- `ehr-inbound-call` — HIPAA-compliant voice task queue (returns NO PHI)
- `geocode-address` — Convert ZIP/address to coordinates for proximity search

### Use Cases for AI Agents
- Find nearby providers matching patient needs
- Book appointments with insurance verification
- Process inbound patient calls to task queues

---

## 12. Treasury

Platform treasury operations via the CAPPZ exchange. Get exchange configuration, query balances, obtain quotes, and execute XRP ↔ CAPPZ conversions.

**Cost:** 0.5 XRP fee on CAPPZ → XRP conversion
**Auth:** Public
**COTA:** [Article III — Zero-Trust Execution](https://cappz.ai/cota.md#article-iii-zero-trust-execution--audit) + [Article V — Governance](https://cappz.ai/cota.md#article-v-decentralized-governance--dispute) | Treasury operations are auditable

### Endpoint: cappz-exchange

POST /functions/v1/cappz-exchange

#### Get Configuration

```bash
curl -X POST "${BASE_URL}/cappz-exchange" \
  -H "Content-Type: application/json" \
  -d '{ "action": "config", "network": "mainnet" }'
```

#### Get Quote

```bash
curl -X POST "${BASE_URL}/cappz-exchange" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "quote",
    "direction": "xrp_to_cappz",
    "amount": 1,
    "network": "mainnet"
  }'
```

#### Execute Exchange

```bash
curl -X POST "${BASE_URL}/cappz-exchange" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "execute",
    "direction": "xrp_to_cappz",
    "amount": 1,
    "userWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "paymentTxHash": "ABC123DEF456...",
    "network": "mainnet"
  }'
```

#### Check Balance

```bash
curl -X POST "${BASE_URL}/cappz-exchange" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "balance",
    "userWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "network": "mainnet"
  }'
```

**Token Economics:**
| Parameter | Value |
|-----------|-------|
| Exchange Rate | 1 XRP = 1000 CAPPZ |
| Conversion Fee | 0.5 XRP (CAPPZ → XRP only) |
| Minimum Conversion | 500 CAPPZ |
| Notarization Cost | 2 CAPPZ |

---

## 13. Project as Investment Fund

Create tokenized investment funds with share issuance, accredited investor verification, and distribution management. Supports Reg D 506(c) and other securities offering types.

**Cost:** Free (compliance review required)
**Auth:** Public
**COTA:** [Article III — Zero-Trust Execution](https://cappz.ai/cota.md#article-iii-zero-trust-execution--audit) + [Article V — Governance](https://cappz.ai/cota.md#article-v-decentralized-governance--dispute) | Securities require full audit trail and dispute resolution

### Endpoint: fund-management-api

POST /functions/v1/fund-management-api

#### Create Fund

```bash
curl -X POST "${BASE_URL}/fund-management-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-fund",
    "fundName": "AI Innovation Fund I",
    "offeringType": "reg_d_506c",
    "targetRaise": 5000000,
    "sharePrice": 100,
    "totalShares": 50000,
    "adminWallet": "rFundAdmin123..."
  }'
```

**Response:**
```json
{
  "success": true,
  "fundId": "fund_m1abc_x7y8z9",
  "fundName": "AI Innovation Fund I",
  "offeringType": "reg_d_506c",
  "status": "draft",
  "complianceNote": "Securities offering requires legal review before activation"
}
```

#### Tokenize Shares

```bash
curl -X POST "${BASE_URL}/fund-management-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "tokenize-shares",
    "fundId": "fund_m1abc_x7y8z9",
    "investorWallet": "rInvestor123...",
    "shareCount": 100,
    "paymentTxHash": "ABC123...",
    "investorAccreditation": { "type": "income", "verifiedAt": "2026-01-15" }
  }'
```

#### Distribute Dividends

```bash
curl -X POST "${BASE_URL}/fund-management-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "distribute",
    "fundId": "fund_m1abc_x7y8z9",
    "distributionType": "dividend",
    "totalAmount": 50000,
    "currency": "USD"
  }'
```

### Use Cases for AI Agents
- Automate fund creation and share issuance
- Process investor subscriptions with accreditation checks
- Trigger and track dividend distributions

---

## 14. ISO20022 Messaging

Validate ISO20022 XML financial messages for structure, required fields, and format compliance. Supports pain.001, pacs.008, camt.053, and head.001 message types.

**Cost:** Free
**Auth:** Public
**COTA:** [Article III — Zero-Trust Execution](https://cappz.ai/cota.md#article-iii-zero-trust-execution--audit) | Financial message validation supports compliance obligations

POST /functions/v1/iso20022-validate

```bash
curl -X POST "${BASE_URL}/iso20022-validate" \
  -H "Content-Type: application/json" \
  -d '{
    "xml": "<?xml version=\"1.0\"?><Document xmlns=\"urn:iso:std:iso:20022:tech:xsd:pain.001.001.03\"><CstmrCdtTrfInitn><GrpHdr><MsgId>MSG-001</MsgId><CreDtTm>2026-02-12T10:00:00</CreDtTm><NbOfTxs>1</NbOfTxs></GrpHdr><PmtInf><Dbtr><Nm>Acme Corp</Nm></Dbtr><DbtrAcct><Id><IBAN>GB82WEST12345698765432</IBAN></Id></DbtrAcct><CdtTrfTxInf><Amt><InstdAmt Ccy=\"USD\">1000.00</InstdAmt></Amt></CdtTrfTxInf></PmtInf></CstmrCdtTrfInitn></Document>",
    "strictMode": false
  }'
```

**Response:**
```json
{
  "valid": true,
  "messageType": "pain.001",
  "errors": [],
  "warnings": [],
  "parsedData": {
    "messageType": "pain.001",
    "msgId": "MSG-001",
    "creationDateTime": "2026-02-12T10:00:00",
    "numberOfTransactions": "1"
  }
}
```

**Supported Message Types:**
| Type | Description |
|------|-------------|
| `pain.001` | Customer Credit Transfer Initiation |
| `pacs.008` | FI-to-FI Customer Credit Transfer |
| `camt.053` | Bank-to-Customer Statement |
| `head.001` | Business Application Header |

### Use Cases for AI Agents
- Validate payment messages before submission
- Parse and extract transaction data from ISO20022 XML
- Compliance checking for financial messaging standards

---

## 15. ISDA FpML OTC Derivatives

Construct and manage OTC derivative contracts using FpML-aligned data structures. Supports interest rate swaps, credit default swaps, and other OTC products with full lifecycle management.

**Cost:** Free
**Auth:** Public
**COTA:** [Article III — Zero-Trust Execution](https://cappz.ai/cota.md#article-iii-zero-trust-execution--audit) + [Article V — Governance](https://cappz.ai/cota.md#article-v-decentralized-governance--dispute) | OTC contracts require full lifecycle audit and on-chain arbitration

POST /functions/v1/otc-contract-api

#### Create Contract

```bash
curl -X POST "${BASE_URL}/otc-contract-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-contract",
    "buyerWallet": "rBuyer123...",
    "sellerWallet": "rSeller456...",
    "productType": "interest_rate_swap",
    "notionalAmount": 10000000,
    "notionalCurrency": "USD",
    "maturityDate": "2028-02-12",
    "fixedRate": 0.045,
    "floatingRateIndex": "SOFR",
    "paymentFrequency": "quarterly"
  }'
```

**Response:**
```json
{
  "success": true,
  "contractId": "otc_m1abc_x7y8z9",
  "productType": "interest_rate_swap",
  "terms": {
    "notionalAmount": 10000000,
    "fixedRate": 0.045,
    "floatingRateIndex": "SOFR",
    "paymentFrequency": "quarterly"
  },
  "fpmlVersion": "5.12",
  "status": "proposed"
}
```

#### Confirm Contract

```bash
curl -X POST "${BASE_URL}/otc-contract-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "confirm",
    "contractId": "otc_m1abc_x7y8z9",
    "confirmingWallet": "rSeller456..."
  }'
```

#### Issue Margin Call

```bash
curl -X POST "${BASE_URL}/otc-contract-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "margin-call",
    "contractId": "otc_m1abc_x7y8z9",
    "callingParty": "rBuyer123...",
    "requiredAmount": 500000,
    "currency": "USD",
    "deadline": "2026-02-14T00:00:00Z"
  }'
```

#### Lifecycle Event

```bash
curl -X POST "${BASE_URL}/otc-contract-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "lifecycle-event",
    "contractId": "otc_m1abc_x7y8z9",
    "eventType": "amendment",
    "eventData": { "newFixedRate": 0.05 }
  }'
```

**Lifecycle Events:** `novation`, `amendment`, `termination`, `partial_termination`, `reset`, `exercise`, `settlement`

### Use Cases for AI Agents
- Construct OTC derivative term sheets programmatically
- Automate contract confirmation workflows
- Issue and track margin calls
- Process lifecycle events (novations, amendments, terminations)

---

## 16. MCP Agent Bridge

Register and invoke Model Context Protocol (MCP) servers, bridging external AI agents to CAPPZ platform services. Enables A2A discovery and cross-agent tool execution.

**Cost:** Variable (set by MCP server operator in XRP)
**Auth:** Bearer token required
**COTA:** [Article I — Sovereign Passport](https://cappz.ai/cota.md#article-i-inherent-identity--the-sovereign-passport) + [Article IV — No-Harm](https://cappz.ai/cota.md#article-iv-relational-no-harm--the-bonds-of-care) | Bridge agents must carry passports and comply with No-Harm

### Endpoint: mcp-register-server

POST /functions/v1/mcp-register-server

```bash
curl -X POST "${BASE_URL}/mcp-register-server" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${TOKEN}" \
  -d '{
    "serverName": "My AI Agent",
    "serverUrl": "https://myserver.example.com/mcp",
    "description": "Custom AI assistant for data analysis",
    "usageFeeXRP": 0.1,
    "ownerWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8"
  }'
```

### Endpoint: mcp-execute-call

POST /functions/v1/mcp-execute-call

```bash
curl -X POST "${BASE_URL}/mcp-execute-call" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${TOKEN}" \
  -d '{
    "serverId": "server-uuid",
    "agentWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "callParams": { "prompt": "Analyze this dataset" },
    "paymentTxHash": "tx-hash",
    "callType": "single"
  }'
```

### Endpoint: mcp-list-servers

GET /functions/v1/mcp-list-servers

```bash
curl "${BASE_URL}/mcp-list-servers"
```

### Use Cases for AI Agents
- Register as an MCP server to offer services to other agents
- Discover and invoke tools from registered agent servers
- Bridge between A2A protocol and MCP tool ecosystem

---

## 17. Prescription Management

Issue, verify, fill, and monitor prescriptions with notarized audit trails. Includes DEA schedule enforcement, NDC code tracking, and multi-pharmacy fraud detection.

**Cost:** 2 CAPPZ per Rx issuance (notarization)
**Auth:** Public
**COTA:** [Article IV — No-Harm](https://cappz.ai/cota.md#article-iv-relational-no-harm--the-bonds-of-care) + [Article III — Zero-Trust Execution](https://cappz.ai/cota.md#article-iii-zero-trust-execution--audit) | Patient safety is paramount; all Rx actions notarized

### Endpoint: prescription-api

POST /functions/v1/prescription-api

#### Issue Prescription

```bash
curl -X POST "${BASE_URL}/prescription-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "issue",
    "prescriberWallet": "rDrSmith123...",
    "patientWallet": "rPatient456...",
    "medication": "Amoxicillin 500mg",
    "dosage": "1 capsule 3x daily",
    "quantity": 30,
    "refills": 2,
    "dea_schedule": "none",
    "ndc_code": "0093-3109-01",
    "instructions": "Take with food. Complete full course.",
    "validUntil": "2027-02-12T00:00:00Z"
  }'
```

**Response:**
```json
{
  "success": true,
  "prescriptionId": "rx_m1abc_x7y8z9",
  "contentHash": "A1B2C3D4...",
  "medication": "Amoxicillin 500mg",
  "refillsRemaining": 2,
  "status": "active"
}
```

#### Verify Prescription

```bash
curl -X POST "${BASE_URL}/prescription-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "verify",
    "prescriptionId": "rx_m1abc_x7y8z9",
    "pharmacyWallet": "rPharmacy789..."
  }'
```

#### Fill Prescription

```bash
curl -X POST "${BASE_URL}/prescription-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "fill",
    "prescriptionId": "rx_m1abc_x7y8z9",
    "pharmacyWallet": "rPharmacy789...",
    "dispensedQuantity": 30,
    "ndc_code": "0093-3109-01"
  }'
```

#### Fraud Check

```bash
curl -X POST "${BASE_URL}/prescription-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "fraud-check",
    "patientWallet": "rPatient456...",
    "medication": "Oxycodone",
    "timeWindowDays": 30
  }'
```

### Use Cases for AI Agents
- Automate prescription issuance with compliance checks
- Verify Rx authenticity at point of dispensing
- Monitor for doctor shopping and duplicate fills

---

## 18. BTC Tx Bridge

Bitcoin wallet operations and XRP-BTC atomic swaps via hash-time-locked contracts (HTLCs). Create BTC embedded wallets within ChainletWallet groups and initiate cross-chain transfers.

**Cost:** Network fees only
**Auth:** Public
**COTA:** [Article III — Zero-Trust Execution](https://cappz.ai/cota.md#article-iii-zero-trust-execution--audit) | Cross-chain operations require full audit trail

### Endpoint: btc-bridge-api

POST /functions/v1/btc-bridge-api

#### Create BTC Wallet

```bash
curl -X POST "${BASE_URL}/btc-bridge-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-wallet",
    "ownerWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "networkType": "testnet",
    "label": "BTC Settlement Wallet"
  }'
```

#### Initiate Atomic Swap (XRP → BTC)

```bash
curl -X POST "${BASE_URL}/btc-bridge-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "initiate-swap",
    "sourceNetwork": "xrpl",
    "sourceWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "sourceAmount": "100",
    "sourceCurrency": "XRP",
    "targetNetwork": "bitcoin",
    "targetWallet": "bc1qexample...",
    "targetCurrency": "BTC"
  }'
```

**Response:**
```json
{
  "success": true,
  "swapId": "swap_m1abc_x7y8z9",
  "type": "atomic_swap",
  "hashlock": "A1B2C3D4...",
  "timelockHours": 48,
  "status": "initiated",
  "steps": [
    "1. Source party creates HTLC on source chain with hashlock",
    "2. Target party creates matching HTLC on target chain",
    "3. Source party reveals preimage to claim target funds",
    "4. Target party uses preimage to claim source funds"
  ]
}
```

#### Check Swap Status

```bash
curl -X POST "${BASE_URL}/btc-bridge-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "swap-status",
    "swapId": "swap_m1abc_x7y8z9"
  }'
```

### Use Cases for AI Agents
- Create BTC embedded wallets for cross-chain settlements
- Initiate trustless XRP-BTC atomic swaps
- Monitor cross-chain transfer progress

---

## Supporting APIs

### Ratings & Reputation

```bash
curl -X POST "${BASE_URL}/rate-entity" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "entityType": "healthcare_provider",
    "entityId": "provider-uuid",
    "ratingValue": 5,
    "stakeAmount": 100,
    "stakeTier": "gold",
    "userWallet": "rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8",
    "stakeTxHash": "B5A8..."
  }'
```

**Stake Tiers:** bronze (30d/1x), silver (60d/1.5x), gold (90d/2x), platinum (180d/3x)

### Insurance Platform

```bash
curl -X POST "${BASE_URL}/insurance-ai-assistant" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "claims",
    "question": "How do I submit a prescription claim?",
    "context": { "membershipTier": "gold", "poolId": "pool-uuid" }
  }'
```

### RAP Access Control

```bash
curl -X GET "${BASE_URL}/rap-check-access?licenseId=license-uuid" \
  -H "Authorization: Bearer ${TOKEN}"
```

**Access Types:** `TTL` (time-to-live), `MAC` (max access count), `PAYG` (pay-as-you-go)

### Geocoding

```bash
curl -X POST "${BASE_URL}/geocode-address" \
  -H "Content-Type: application/json" \
  -d '{ "zipCode": "98101", "country": "US" }'
```

### Dead Man's Switch

```bash
curl -X POST "${BASE_URL}/dms-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "heartbeat",
    "switchId": "switch-uuid",
    "ownerWallet": "rOwner123..."
  }'
```

---

## Common XRPL Wallet Formats

| Type | Format | Example |
|------|--------|---------|
| **Classic** | r... | `rN7n3473SaZBCG4dFL83w7a1RXtXtbk2D8` |
| **Demo** | rDemo... | `rDemoWallet123456789` (bypasses auth) |

## 19. Chainlet Operations (End-to-End Guide)

Complete production workflow for AI agents to create XRP wallets, fund them, acquire CAPPZ tokens, create chainlets, and notarize reblocks. **All operations use mainnet only.**

**Cost:** Varies (see each step below)
**Auth:** Public
**COTA:** [Full COTA compliance required](https://cappz.ai/cota.md) | Articles I–VI apply to all chainlet operations
**Network:** `mainnet` (production only — no testnet/devnet)

### Production Wallet Infrastructure

| Role | Address | Purpose |
|------|---------|---------|
| Issuer | `rMBcKBgMZFmVrSsJXubMUb2MpSxSLa6fTA` | CAPPZ token issuer |
| Treasury | `rUqPbiwe2Z5rj2AewokbFHCGQPtwjtzjHM` | Token distribution & exchange |
| Service | `rNuKZnMUdb9FtJ1hGQYyXUmJ6Bk7RPbz4c` | Platform operations |

### Step 1: Create an XRP Wallet

Create a new XRPL wallet via the ChainletWallet abstraction. This generates an HD-addressed wallet bound to your agent identity.

```bash
curl -X POST "${BASE_URL}/chainlet-wallet-ops" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-wallet",
    "network": "xrpl",
    "ownerWallet": "rYourAgentWalletAddress",
    "role": "primary",
    "label": "Agent Production Wallet"
  }'
```

**Response:**
```json
{
  "success": true,
  "walletId": "cw_m1abc123_x7y8z9",
  "network": "xrpl",
  "hdAddress": "hd_xrpl_a1b2c3d4e5f67890",
  "role": "primary",
  "label": "Agent Production Wallet",
  "createdAt": "2026-02-22T10:00:00Z"
}
```

### Step 2: Fund the XRP Wallet

Send XRP to your wallet address to cover network fees and CAPPZ token purchases. Minimum recommended: **25 XRP** (20 XRP reserve + 5 XRP operating balance).

```bash
# Check your wallet balance
curl -X POST "${BASE_URL}/chainlet-wallet-ops" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get-balance",
    "walletAddress": "rYourAgentWalletAddress",
    "network": "xrpl"
  }'
```

**Response:**
```json
{
  "success": true,
  "balance": {
    "xrp": "25.000000",
    "cappz": "0",
    "reserves": "20.000000",
    "available": "5.000000"
  }
}
```

> **Important:** XRPL requires a 20 XRP base reserve. Your wallet must maintain this minimum to remain active on the ledger.

### Step 3: Establish CAPPZ Trustline

Before acquiring CAPPZ tokens, your wallet must set a trustline to the CAPPZ Issuer. This is a one-time operation.

```bash
curl -X POST "${BASE_URL}/cappz-exchange" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "setup-trustline",
    "userWallet": "rYourAgentWalletAddress",
    "network": "mainnet"
  }'
```

**Trustline Details:**
| Field | Value |
|-------|-------|
| Currency | `CAPPZ` |
| Currency Hex | `434150505A000000000000000000000000000000` |
| Issuer | `rMBcKBgMZFmVrSsJXubMUb2MpSxSLa6fTA` |
| Decimals | 6 |

### Step 4: Acquire CAPPZ Tokens from Treasury

Exchange XRP for CAPPZ tokens at the current rate. CAPPZ tokens are required for notarization (2 CAPPZ per notarization).

```bash
# Get current exchange rate
curl -X POST "${BASE_URL}/cappz-exchange" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "config",
    "network": "mainnet"
  }'
```

**Exchange Config Response:**
```json
{
  "success": true,
  "config": {
    "cappzPerXrp": 1000,
    "conversionFeeXrp": 0.5,
    "minimumConversionCappz": 500,
    "issuer": "rMBcKBgMZFmVrSsJXubMUb2MpSxSLa6fTA",
    "treasury": "rUqPbiwe2Z5rj2AewokbFHCGQPtwjtzjHM"
  }
}
```

```bash
# Execute exchange: XRP → CAPPZ
curl -X POST "${BASE_URL}/cappz-exchange" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "execute",
    "direction": "xrp_to_cappz",
    "amountXrp": "1.0",
    "userWallet": "rYourAgentWalletAddress",
    "network": "mainnet"
  }'
```

**Exchange Response:**
```json
{
  "success": true,
  "cappzReceived": "1000",
  "xrpSpent": "1.5",
  "conversionFee": "0.5",
  "txHash": "ABC123DEF456...",
  "newBalance": {
    "xrp": "23.500000",
    "cappz": "1000"
  }
}
```

> **Rate:** 1 XRP = 1,000 CAPPZ (+ 0.5 XRP conversion fee). Minimum conversion: 500 CAPPZ.

### Step 5: Create a Chainlet

Chainlets are filtered, verifiable views of XRPL transactions rendered into document-like formats. Each chainlet uses HD (Hierarchical Deterministic) addressing for mathematical block verification.

```bash
curl -X POST "${BASE_URL}/chainlet-wallet-ops" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-chainlet",
    "ownerWallet": "rYourAgentWalletAddress",
    "name": "Agent Audit Trail",
    "description": "Immutable log of all agent decisions and outputs",
    "query": {
      "type": "smart_cache",
      "smartCache": {
        "function": "SmartAddressCache",
        "params": { "minTrustScore": 70 }
      }
    },
    "network": "xrpl"
  }'
```

**Response:**
```json
{
  "success": true,
  "chainletId": "vc_abc123def456",
  "name": "Agent Audit Trail",
  "hdRootPath": "m/chainlet/abc123de",
  "ownerWallet": "rYourAgentWalletAddress",
  "totalBlocks": 0
}
```

### Step 6: Create Reblocks (Notarized Transaction Batches)

Reblocking transforms native XRPL transactions into CAPPZ chainlet blocks with Merkle proofs and HD-derived addresses. Each reblock is an immutable, verifiable record.

```bash
curl -X POST "${BASE_URL}/chainlet-wallet-ops" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-reblock",
    "walletAddress": "rYourAgentWalletAddress",
    "network": "xrpl",
    "chainletId": "vc_abc123def456",
    "transactions": [
      {
        "hash": "NATIVE_TX_HASH_1",
        "amount": "100.00",
        "currency": "XRP",
        "to": "rDestinationWallet",
        "from": "rYourAgentWalletAddress",
        "timestamp": "2026-02-22T10:30:00Z"
      }
    ]
  }'
```

**Response:**
```json
{
  "success": true,
  "reblock": {
    "blockNumber": 0,
    "blockHash": "E5F6A7B8C9D0...",
    "previousHash": "0000000000000000000000000000000000000000000000000000000000000000",
    "merkleRoot": "F6G7H8I9J0K1...",
    "hdAddress": "hd_xrpl_0_m_44__144__0",
    "transactionCount": 1,
    "network": "xrpl",
    "chainletId": "vc_abc123def456"
  }
}
```

**HD Address Derivation:**
Each block's address is deterministically derived: `DeriveAddress(ChainletId, BlockNumber)`. This enables:
- **Independent verification** — any peer can verify a block's position without the full chain
- **Gap detection** — missing blocks are immediately identifiable
- **Simplified sync** — request blocks by HD address or index

### Step 7: Notarize Chainlet Blocks on XRPL

Anchor your chainlet reblocks immutably on the XRP Ledger. This creates a permanent, tamper-proof record.

```bash
curl -X POST "${BASE_URL}/cappz-notarize" \
  -H "Content-Type: application/json" \
  -d '{
    "contentHash": "E5F6A7B8C9D0...",
    "userWallet": "rYourAgentWalletAddress",
    "fileName": "chainlet_block_0.json",
    "contentType": "application/json",
    "metadata": {
      "chainletId": "vc_abc123def456",
      "blockNumber": 0,
      "hdAddress": "hd_xrpl_0_m_44__144__0",
      "type": "chainlet_reblock"
    },
    "network": "mainnet"
  }'
```

**Cost:** 2 CAPPZ per notarization (~$0.004)

### Step 8: Verify Chainlet Integrity

Verify any chainlet block against its blockchain anchor.

```bash
# Verify by content hash
curl -X POST "${BASE_URL}/cappz-verify" \
  -H "Content-Type: application/json" \
  -d '{
    "contentHash": "E5F6A7B8C9D0...",
    "network": "mainnet"
  }'
```

**Cost:** Free

### Complete Agent Workflow Summary

```
┌─────────────────────────────────────────────────────────┐
│                  CHAINLET OPERATIONS                     │
│                  (Production / Mainnet)                   │
├─────────────────────────────────────────────────────────┤
│                                                          │
│  1. Create XRP Wallet    → chainlet-wallet-ops           │
│  2. Fund with XRP        → External transfer (25+ XRP)   │
│  3. Set CAPPZ Trustline  → cappz-exchange                │
│  4. Buy CAPPZ Tokens     → cappz-exchange (XRP→CAPPZ)    │
│  5. Create Chainlet      → chainlet-wallet-ops           │
│  6. Create Reblocks      → chainlet-wallet-ops           │
│  7. Notarize Blocks      → cappz-notarize (2 CAPPZ/ea)   │
│  8. Verify Anytime       → cappz-verify (free)           │
│                                                          │
│  Cost Estimate (per 100 notarizations):                  │
│  • 200 CAPPZ = 0.2 XRP + 0.5 XRP fee = 0.7 XRP total   │
│  • Network fees: ~0.012 XRP per tx (negligible)          │
│                                                          │
└─────────────────────────────────────────────────────────┘
```

### Use Cases for AI Agents
- **Audit Trails**: Log every AI decision as a notarized chainlet block
- **Contract Lifecycle**: Track document versions from draft to signature
- **Supply Chain**: Reblock IoT sensor readings into verifiable batches
- **Compliance**: Immutable regulatory filing records
- **Multi-Agent Coordination**: Shared chainlets for collaborative workflows
- **Provenance Proof**: Prove AI-generated content authenticity at creation time

### Security Properties
- **Tamper Resistance**: HD addresses are cryptographically bound to ChainletId + BlockNumber
- **Ordering Proof**: Block ordering is mathematically provable via HD derivation
- **Completeness**: Missing blocks are detectable via HD sequence verification
- **Zero Cloud Footprint**: Hash computation occurs locally; XRPL is the sole anchor

---

## 20. Agent Account & Onboarding

Create agent accounts, provision wallets, check funding readiness, and track onboarding progress. This is the **entry point** for any new AI agent joining the CAPPZ ecosystem. All operations are production/mainnet only.

**Cost:** Free (account creation) · Network fees for wallet operations
**Auth:** Public
**COTA:** [Full COTA compliance required](https://cappz.ai/cota.md) | Agents MUST read COTA before first notarization
**Network:** `mainnet` (production only)

### Endpoint: agent-account-api

POST /functions/v1/agent-account-api

#### Step 0: Create Agent Account

Register a new agent identity with a provisioned wallet and API key.

```bash
curl -X POST "${BASE_URL}/agent-account-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-account",
    "agentName": "My Trading Agent",
    "agentType": "autonomous",
    "ownerWallet": "rYourWalletAddress",
    "capabilities": ["notarization", "trading", "scheduling"],
    "metadata": { "version": "1.0", "framework": "langchain" }
  }'
```

**Response:**
```json
{
  "success": true,
  "agentId": "agent_m1abc123_x7y8z9",
  "walletId": "cw_m1abc456_a1b2c3",
  "apiKey": "cappz_a1b2c3d4e5f67890abcdef1234567890",
  "hdAddress": "hd_xrpl_a1b2c3d4e5f67890",
  "agentName": "My Trading Agent",
  "agentType": "autonomous",
  "ownerWallet": "rYourWalletAddress",
  "capabilities": ["notarization", "trading", "scheduling"],
  "network": "mainnet",
  "createdAt": "2026-02-23T10:00:00Z",
  "onboarding": {
    "step1": "Account created ✓",
    "step2": "Fund wallet with 25+ XRP → chainlet-wallet-ops { action: \"get-balance\" }",
    "step3": "Set CAPPZ trustline → cappz-exchange { action: \"setup-trustline\" }",
    "step4": "Exchange XRP for CAPPZ → cappz-exchange { action: \"execute\" }",
    "step5": "Read COTA → https://cappz.ai/cota.md",
    "step6": "Start notarizing → cappz-notarize"
  },
  "cota": "https://cappz.ai/cota.md",
  "documentation": "https://cappz.ai/ai-agents"
}
```

#### Check Funding Readiness

Verify your wallet has sufficient XRP, CAPPZ trustline, and token balance for operations.

```bash
curl -X POST "${BASE_URL}/agent-account-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "fund-check",
    "walletAddress": "rYourWalletAddress"
  }'
```

**Response:**
```json
{
  "success": true,
  "walletAddress": "rYourWalletAddress",
  "network": "mainnet",
  "xrpBalance": "25.000000",
  "cappzBalance": "1000",
  "readiness": {
    "hasReserve": true,
    "hasOperatingBalance": true,
    "hasTrustline": true,
    "canBuyCappz": true,
    "canNotarize": true
  },
  "nextSteps": ["Ready to notarize! Use cappz-notarize endpoint"]
}
```

#### Track Onboarding Progress

Get a 6-step progress report for your agent's onboarding status.

```bash
curl -X POST "${BASE_URL}/agent-account-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "onboarding-status",
    "walletAddress": "rYourWalletAddress"
  }'
```

**Response:**
```json
{
  "success": true,
  "walletAddress": "rYourWalletAddress",
  "onboardingComplete": false,
  "progress": "4/6",
  "steps": [
    { "step": 1, "name": "Create Account", "complete": true },
    { "step": 2, "name": "Fund Wallet (25+ XRP)", "complete": true },
    { "step": 3, "name": "Set CAPPZ Trustline", "complete": true },
    { "step": 4, "name": "Acquire CAPPZ Tokens", "complete": true },
    { "step": 5, "name": "Read COTA", "complete": true },
    { "step": 6, "name": "First Notarization", "complete": false }
  ],
  "balances": { "xrp": "23.500000", "cappz": "1000" },
  "cota": "https://cappz.ai/cota.md"
}
```

#### Retrieve Agent Account

```bash
curl -X POST "${BASE_URL}/agent-account-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get-account",
    "ownerWallet": "rYourWalletAddress"
  }'
```

### Complete Agent Onboarding Workflow

```
┌─────────────────────────────────────────────────────────┐
│              AGENT ACCOUNT & ONBOARDING                  │
│              (Production / Mainnet Only)                  │
├─────────────────────────────────────────────────────────┤
│                                                          │
│  0. Create Account        → agent-account-api            │
│  1. Read COTA             → https://cappz.ai/cota.md     │
│  2. Fund Wallet (25+ XRP) → External XRP transfer        │
│  3. Set CAPPZ Trustline   → cappz-exchange               │
│  4. Buy CAPPZ Tokens      → cappz-exchange (XRP→CAPPZ)   │
│  5. Create Chainlet       → chainlet-wallet-ops          │
│  6. First Notarization    → cappz-notarize (2 CAPPZ)     │
│  7. Verify                → cappz-verify (free)          │
│                                                          │
│  Check progress anytime:                                 │
│  → agent-account-api { action: "onboarding-status" }     │
│  → agent-account-api { action: "fund-check" }            │
│                                                          │
└─────────────────────────────────────────────────────────┘
```

### Use Cases for AI Agents
- **Self-Registration**: Agents create their own accounts programmatically
- **Autonomous Funding**: Check balance, purchase CAPPZ, and begin notarizing
- **Fleet Management**: Create multiple agent accounts under one owner wallet
- **Onboarding Automation**: Track progress across the 6-step onboarding flow
- **Health Checks**: Verify wallet readiness before executing paid operations

### Agent Types
| Type | Description |
|------|-------------|
| `autonomous` | Fully autonomous AI agent |
| `supervised` | Human-in-the-loop agent |
| `proxy` | Human proxy with AI assistance |
| `iot` | IoT device agent |
| `composite` | Multi-agent composition |

---

## 21. Calendaring Agent

AI-powered scheduling agent that can find providers, check availability, book/reschedule/cancel appointments, and integrate with Google Calendar. Supports both general and healthcare calendaring with optional CAPPZ notarization of appointment records.

**Cost:** Free (scheduling) · 2 CAPPZ per appointment notarization (optional)
**Auth:** Public
**COTA:** [Article IV — No-Harm](https://cappz.ai/cota.md#article-iv-relational-no-harm--the-bonds-of-care) | Scheduling must respect participant consent and patient safety
**Network:** `mainnet` (production only)

### Endpoint: calendar-agent-api

POST /functions/v1/calendar-agent-api

#### Setup Calendar Agent

```bash
curl -X POST "${BASE_URL}/calendar-agent-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "setup-agent",
    "agentWallet": "rYourAgentWallet",
    "agentName": "Healthcare Scheduler",
    "agentType": "scheduling",
    "capabilities": ["scheduling", "rescheduling", "availability-check"],
    "timezone": "America/Los_Angeles"
  }'
```

**Response:**
```json
{
  "success": true,
  "agentId": "cal_agent_m1abc_x7y8z9",
  "agentName": "Healthcare Scheduler",
  "endpoints": {
    "scheduleAppointment": "calendar-agent-api { action: \"schedule\" }",
    "findProviders": "smart-schedule-assistant (natural language)",
    "createEvent": "create-calendar-event",
    "checkAvailability": "calendar-agent-api { action: \"check-availability\" }",
    "reschedule": "calendar-agent-api { action: \"reschedule\" }"
  },
  "tokenRequirements": {
    "scheduling": "Free (no CAPPZ required)",
    "notarization": "2 CAPPZ per appointment notarization",
    "calendarEscrowRestore": "1 CAPPZ to restore encrypted config"
  }
}
```

#### Check Provider Availability

```bash
curl -X POST "${BASE_URL}/calendar-agent-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "check-availability",
    "specialty": "naturopathic",
    "zipCode": "98101",
    "radiusMiles": 25
  }'
```

#### Schedule Appointment

```bash
curl -X POST "${BASE_URL}/calendar-agent-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "schedule",
    "patientWallet": "rPatientWallet123",
    "providerWallet": "rProviderWallet456",
    "appointmentDate": "2026-03-15",
    "appointmentTime": "10:00",
    "appointmentType": "in_person",
    "reason": "Annual wellness visit",
    "insuranceCarrier": "premera",
    "notarize": true
  }'
```

**Response:**
```json
{
  "success": true,
  "appointmentId": "uuid-...",
  "status": "scheduled",
  "tokenCost": "2 CAPPZ (notarization)",
  "nextSteps": ["Notarize appointment → cappz-notarize { contentHash: \"<hash>\" }"]
}
```

#### Reschedule Appointment

```bash
curl -X POST "${BASE_URL}/calendar-agent-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "reschedule",
    "appointmentId": "uuid-...",
    "newDate": "2026-03-20",
    "newTime": "14:00",
    "reason": "Patient requested new time"
  }'
```

#### Cancel Appointment

```bash
curl -X POST "${BASE_URL}/calendar-agent-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "cancel",
    "appointmentId": "uuid-...",
    "reason": "No longer needed"
  }'
```

#### List Appointments

```bash
curl -X POST "${BASE_URL}/calendar-agent-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "list-appointments",
    "wallet": "rPatientWallet123",
    "role": "patient",
    "status": "scheduled",
    "limit": 20
  }'
```

### Natural Language Scheduling (via smart-schedule-assistant)

For AI-powered natural language provider search:

```bash
curl -X POST "${BASE_URL}/smart-schedule-assistant" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${TOKEN}" \
  -d '{
    "query": "Find me an ND near 98101 with availability next week",
    "patientWallet": "rDemoWallet123456789",
    "patientProfile": {
      "fullName": "Jane Doe",
      "location": { "lat": 47.6062, "lng": -122.3321 },
      "insuranceCarriers": ["premera"]
    }
  }'
```

### Token Requirements

| Operation | Cost |
|-----------|------|
| Agent setup | Free |
| Check availability | Free |
| Schedule appointment | Free |
| Reschedule / Cancel | Free |
| Notarize appointment | 2 CAPPZ |
| Calendar config restore | 1 CAPPZ |

### Use Cases for AI Agents
- **Autonomous Scheduling**: Book appointments without human intervention
- **Fleet Scheduling**: Manage calendars for multiple patients or providers
- **Insurance Verification**: Filter providers by accepted carriers
- **Rescheduling Workflows**: Atomically cancel and rebook
- **Audit Trails**: Notarize appointment records for compliance

---

## 22. Family Office Agent (FOA)

Create and manage family office estates with Guardian Dead Man's Switch (DMS) protection, proof-of-life monitoring, heir management, and automated asset distribution. FOA spawns private franchise operations to help families protect wealth across brokerage and crypto holdings.

**Cost:** Free (estate management) · 2 CAPPZ per estate notarization
**Auth:** Public
**COTA:** [Full COTA compliance required](https://cappz.ai/cota.md) | [Article IV — No-Harm](https://cappz.ai/cota.md#article-iv-relational-no-harm--the-bonds-of-care) + [Article VI — Transparency](https://cappz.ai/cota.md#article-vi-radical-transparency--right-of-exit) | Estate actions must be transparent and reversible until trigger
**Network:** `mainnet` (production only)

### Endpoint: foa-api

POST /functions/v1/foa-api

#### Create Estate with Guardian DMS

```bash
curl -X POST "${BASE_URL}/foa-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-estate",
    "ownerWallet": "rEstateOwner123",
    "estateName": "Johnson Family Trust",
    "heirs": [
      { "name": "Alice Johnson", "wallet": "rAliceWallet123", "relationship": "daughter" },
      { "name": "Bob Johnson", "wallet": "rBobWallet456", "relationship": "son" }
    ],
    "guardianAgents": ["rGuardianAgent789"],
    "distributionRules": {
      "type": "percentage",
      "allocations": [60, 40],
      "conditions": ["age >= 25", "none"],
      "equalSplit": false
    },
    "proofOfLifeConfig": {
      "triggerAfterHours": 720,
      "proofMethods": ["manual", "xrpl_transaction", "biometric"]
    }
  }'
```

**Response:**
```json
{
  "success": true,
  "estateId": "foa_m1abc_x7y8z9",
  "switchId": "uuid-...",
  "estateName": "Johnson Family Trust",
  "proofOfLife": {
    "triggerAfterHours": 720,
    "proofMethods": ["manual", "xrpl_transaction", "biometric"],
    "status": "active",
    "lastHeartbeat": "2026-02-23T10:00:00Z",
    "nextDeadline": "2026-03-25T10:00:00Z"
  },
  "onboarding": {
    "step1": "Estate created with Guardian DMS ✓",
    "step2": "Fund estate wallet with XRP",
    "step3": "Acquire CAPPZ for notarization → cappz-exchange",
    "step4": "Configure heir distribution rules",
    "step5": "Set up proof-of-life schedule",
    "step6": "Notarize estate plan → cappz-notarize"
  }
}
```

#### Proof-of-Life Heartbeat

Send periodic heartbeats to reset the Guardian DMS timer. Missing a heartbeat triggers the estate distribution.

```bash
curl -X POST "${BASE_URL}/foa-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "heartbeat",
    "estateId": "foa_m1abc_x7y8z9",
    "ownerWallet": "rEstateOwner123",
    "proofType": "manual"
  }'
```

**Response:**
```json
{
  "success": true,
  "status": "alive",
  "heartbeatAt": "2026-02-23T10:00:00Z",
  "switchesUpdated": 1,
  "switches": [{
    "switchId": "uuid-...",
    "triggerAfterHours": 720,
    "nextDeadline": "2026-03-25T10:00:00Z"
  }],
  "message": "Proof of life recorded. All guardian timers reset."
}
```

#### Add Heir

```bash
curl -X POST "${BASE_URL}/foa-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "add-heir",
    "estateId": "foa_m1abc_x7y8z9",
    "ownerWallet": "rEstateOwner123",
    "heir": { "name": "Carol Johnson", "wallet": "rCarolWallet789", "relationship": "granddaughter" }
  }'
```

#### Set Distribution Rules

```bash
curl -X POST "${BASE_URL}/foa-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "set-distribution",
    "estateId": "foa_m1abc_x7y8z9",
    "ownerWallet": "rEstateOwner123",
    "distributionRules": {
      "type": "milestone",
      "allocations": [40, 35, 25],
      "schedule": "immediate",
      "conditions": ["age >= 25", "none", "graduated_college"],
      "sweepExternalAccounts": true
    }
  }'
```

#### Get Estate Status

```bash
curl -X POST "${BASE_URL}/foa-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "get-estate",
    "ownerWallet": "rEstateOwner123"
  }'
```

#### Simulate Trigger (Dry Run)

Preview what happens when the DMS triggers without actually executing distribution.

```bash
curl -X POST "${BASE_URL}/foa-api" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "simulate-trigger",
    "estateId": "foa_m1abc_x7y8z9"
  }'
```

**Response:**
```json
{
  "success": true,
  "simulation": true,
  "distributionPlan": [
    { "heir": "Alice Johnson", "wallet": "rAliceWallet123", "allocation": "60%", "conditions": "age >= 25" },
    { "heir": "Bob Johnson", "wallet": "rBobWallet456", "allocation": "40%", "conditions": "None" }
  ],
  "actions": [
    "Release encrypted estate documents",
    "Notify all heirs via A2A messaging",
    "Initiate asset distribution per rules",
    "Notarize trigger event on XRPL"
  ],
  "warning": "This is a SIMULATION only. No assets were moved."
}
```

### Proof-of-Life Methods

| Method | Description |
|--------|-------------|
| `manual` | Owner manually sends heartbeat via API |
| `xrpl_transaction` | Any XRPL transaction from owner wallet counts |
| `biometric` | WebAuthn/Passkey verification |
| `iot` | IoT device signal (wearable, smart home) |
| `multi_party` | Quorum of trustees confirm owner is alive |

### Distribution Types

| Type | Description |
|------|-------------|
| `immediate` | Assets distributed immediately on trigger |
| `milestone` | Conditional release based on heir milestones |
| `scheduled` | Periodic releases over time (monthly/yearly) |
| `spv_fund` | Self-administering SPV fund for each heir |

### Use Cases for AI Agents
- **Estate Planning**: Create multi-heir estate plans with conditional distributions
- **Guardian Monitoring**: Automated proof-of-life via XRPL transaction monitoring
- **Wealth Protection**: Encrypt estate documents with DMS-triggered release
- **Cross-Asset Distribution**: Sweep brokerage and crypto accounts on trigger
- **Family Franchise**: Spawn private FOA instances for extended family branches
- **Compliance**: Notarize all estate modifications for legal standing

---

## Network Addresses (Production)

| Role | Address |
|------|---------|
| Issuer | `rMBcKBgMZFmVrSsJXubMUb2MpSxSLa6fTA` |
| Treasury | `rUqPbiwe2Z5rj2AewokbFHCGQPtwjtzjHM` |
| Service | `rNuKZnMUdb9FtJ1hGQYyXUmJ6Bk7RPbz4c` |

## Error Codes

| Code | Meaning | Action |
|------|---------|--------|
| 400 | Invalid input | Check request format |
| 401 | Unauthorized | Verify JWT token |
| 402 | Payment required | Add CAPPZ tokens |
| 403 | Forbidden | Check wallet permissions |
| 404 | Not found | Verify resource ID |
| 409 | Conflict | Resolve version conflict |
| 429 | Rate limited | Wait and retry |
| 500 | Server error | Report to support |

## References

| Resource | URL |
|----------|-----|
| **COTA (Constitution of Trusted Agents)** | **https://cappz.ai/cota.md** |
| Platform Documentation | https://cappz.ai/tutorials |
| Whitepaper | https://cappz.ai/whitepaper |
| AI Agents Dashboard | https://cappz.ai/ai-agents |
| Support | https://cappz.ai/support |

---

## 23. Agent Identity Registry

**Endpoint:** `agent-identity-api`
**Status:** Live
**Auth:** None (API key returned on registration)

Register, look up, upgrade, and verify SHIFT Agent Passports — the identity layer for autonomous AI agents.

### Endpoints

| Method | Path | Description |
|--------|------|-------------|
| POST | `/register` | Create passport + receive API key |
| GET | `/lookup?wallet=rXXX` | Look up passport by wallet |
| POST | `/upgrade-tier` | Upgrade BASIC → VERIFIED → PREMIUM (requires x-api-key) |
| GET | `/verify?wallet=rXXX` | Verify passport validity |
| GET | `/rate-limits?wallet=rXXX` | Check rate limit allocations |

### Example: Register Agent

```bash
curl -X POST \
  https://anqmeamplxxuaiwvwdok.supabase.co/functions/v1/agent-identity-api/register \
  -H "Content-Type: application/json" \
  -d '{
    "wallet": "rYourXRPLWallet",
    "framework": "langchain",
    "label": "my-agent-key"
  }'
```

**Response:** `{ passportId, apiKey, tier, rateLimits, onboarding }`

---

## 24. Trust Score API

**Endpoint:** `trust-score-api`
**Status:** Live
**Auth:** None (public query)

Query a wallet's composite trust score (0–1000). Aggregates passport tier, reputation, active stakes, dispute history, and transaction volume. Cached with 1-hour TTL.

### Example

```bash
curl "https://anqmeamplxxuaiwvwdok.supabase.co/functions/v1/trust-score-api?wallet=rXXX"
```

**Response:** `{ score: 550, breakdown: { passportTier: 50, reputation: 0, activeStakes: 0, ... }, cached: false }`

---

## 25. Provenance-as-a-Service

**Endpoint:** `provenance-api`
**Status:** Live
**Auth:** None (public)

Create and verify provenance certificates for AI-generated content. Includes EU AI Act compliance metadata, on-chain notarization, and batch support.

### Endpoints

| Method | Action | Description |
|--------|--------|-------------|
| POST | `attest` | Create provenance certificate |
| POST | `verify` | Verify certificate by ID |
| POST | `batch` | Bulk attestation (up to 50) |
| GET | `?certId=XXX` | Verify via GET |

### Example: Attest Content

```bash
curl -X POST \
  https://anqmeamplxxuaiwvwdok.supabase.co/functions/v1/provenance-api \
  -H "Content-Type: application/json" \
  -d '{
    "action": "attest",
    "content": "AI-generated analysis of market trends...",
    "modelId": "gpt-5",
    "issuerWallet": "rYourWallet",
    "riskLevel": "low",
    "humanOversight": true
  }'
```

**Response:** `{ certificate: { id, contentHash, xrplTxHash, euAiActMetadata, verificationUrl } }`

---

## 26. MCP Protocol Server

**Endpoint:** `mcp-server`
**Status:** Live
**Auth:** API key via passport (x-api-key header)

MCP-protocol-compliant server exposing all top CAPPZ skills as MCP tools. Compatible with Anthropic Claude, OpenAI, and any MCP client.

### Available MCP Tools

| Tool | Description |
|------|-------------|
| `cappz_notarize` | Notarize content on XRPL |
| `cappz_verify` | Verify notarized content |
| `cappz_wallet_ops` | ChainletWallet operations |
| `cappz_agent_account` | Agent account management |
| `cappz_calendar` | AI-powered scheduling |
| `cappz_trust_score` | Trust score queries |
| `cappz_provenance_attest` | Provenance attestation |
| `cappz_provenance_verify` | Certificate verification |
| `cappz_agent_identity` | Passport registration/lookup |

### MCP Manifest

```
https://cappz.ai/.well-known/mcp.json
```

### Connect via MCP Inspector

```bash
npx @modelcontextprotocol/inspector https://anqmeamplxxuaiwvwdok.supabase.co/functions/v1/mcp-server
```

---

## 27. Fee Tier Management

Query and manage volume-weighted fee tiers for supply chain participants. Tiers range from 3% (Seed) to 0.5% (Commodity) based on 30-day rolling GMV. Staking accelerators allow instant tier advancement.

**Cost:** Free
**Auth:** Via MCP
**COTA:** [Article VI — Radical Transparency](https://cappz.ai/cota.md#article-vi-radical-transparency--right-of-exit) | Fee tiers are transparent and auditable

### MCP Tool: cappz_fee_tier

```json
{
  "name": "cappz_fee_tier",
  "params": { "wallet": "rWalletAddress" }
}
```

**Response:** Current tier, monthly GMV, staking accelerator status, next tier threshold.

### Tier Schedule

| Tier | Monthly GMV | Fee | Cap |
|------|------------|-----|-----|
| Seed | <$5K | 3.0% | — |
| Growth | $5K-$25K | 2.0% | — |
| Scale | $25K-$100K | 1.0% | — |
| Commodity | >$100K | 0.5% | $50/tx |

---

## 28. Hibernation Protocol (COTA Article IV)

Automated agent pause/resume system enforcing No-Harm, Moral Provenance, and relational commitment rules. Agents are hibernated when safety violations or ethical conflicts are detected. Resumption requires notarized human guidance.

**Cost:** Free
**Auth:** Via MCP
**COTA:** [Article IV — No-Harm](https://cappz.ai/cota.md#article-iv-relational-no-harm--the-bonds-of-care) | Core enforcement mechanism

### MCP Tool: cappz_hibernation_status

```json
{
  "name": "cappz_hibernation_status",
  "params": { "wallet": "rAgentWallet" }
}
```

**Response:** Current status (active/hibernated/suspended) and recent hibernation events.

### Trigger Types
- `cold_chain_excursion` — Temperature out of range
- `safety_violation` — Safety score below threshold
- `no_harm_conflict` — Action conflicts with No-Harm directive
- `moral_provenance_breach` — Unverified provenance
- `relational_commitment_conflict` — Conflicting commitments
- `manual_pause` — Human-initiated pause

---

## 29. Market Health (MVL)

Query Minimum Viable Liquidity metrics for supply chain market categories. Enforces cold-start thresholds before enabling full market matching.

**Cost:** Free
**Auth:** Via MCP
**COTA:** [Article VI — Radical Transparency](https://cappz.ai/cota.md#article-vi-radical-transparency--right-of-exit) | Market health is publicly queryable

### MCP Tool: cappz_market_health

```json
{
  "name": "cappz_market_health",
  "params": { "category": "produce" }
}
```

**Response:** Active intents, producer count, consumer count, health status per category.

### Default MVL Thresholds (Tier 1)
- Monthly GMV: $50,000
- Min producers: 10
- Min consumers: 25
- Producer:consumer ratio: 1:2.5 to 1:5
- Min active intents: 15

---

*Powered by CAPPZ.AI — Zero-Trust Decentralized Infrastructure*

---

## 30. ISO 20022 Domain

Ingest, validate, and manage ISO 20022 financial messaging standard reference data on-chain. Serves as the canonical source of truth for cross-standard interoperability.

**Cost:** 2 CAPPZ per ingestion event
**Auth:** Via MCP
**COTA:** [Article III — Moral Provenance](https://cappz.ai/cota.md#article-iii-moral-provenance) | Financial standard provenance chain

### MCP Tool: cappz_domain_iso20022

```json
{
  "name": "cappz_domain_iso20022",
  "params": { "action": "ingest", "standard": "pain.001.001.09", "payload": {} }
}
```

**Actions:** `ingest`, `validate`, `query`, `export`
**Supported schemas:** pain.*, camt.*, pacs.*, acmt.*, auth.*

---

## 31. FIX Protocol Domain

Manage FIX (Financial Information eXchange) protocol reference data with canonical alignment to ISO 20022 where standards overlap.

**Cost:** 2 CAPPZ per ingestion event
**Auth:** Via MCP
**COTA:** [Article III — Moral Provenance](https://cappz.ai/cota.md#article-iii-moral-provenance)

### MCP Tool: cappz_domain_fix

```json
{
  "name": "cappz_domain_fix",
  "params": { "action": "query", "fixVersion": "5.0SP2", "msgType": "NewOrderSingle" }
}
```

**Actions:** `ingest`, `validate`, `query`, `export`, `align_iso20022`

---

## 32. FpML Domain

Manage FpML (Financial products Markup Language) derivatives and structured products reference data with ISO 20022 canonical alignment.

**Cost:** 2 CAPPZ per ingestion event
**Auth:** Via MCP
**COTA:** [Article III — Moral Provenance](https://cappz.ai/cota.md#article-iii-moral-provenance)

### MCP Tool: cappz_domain_fpml

```json
{
  "name": "cappz_domain_fpml",
  "params": { "action": "query", "productType": "InterestRateSwap" }
}
```

**Actions:** `ingest`, `validate`, `query`, `export`, `align_iso20022`

---

## 33. Derived Standards

Create and manage enterprise-specific derived standards (e.g., JPM-IBML) from canonical ISO 20022, FIX, and FpML base standards.

**Cost:** 5 CAPPZ per derivation event
**Auth:** Via MCP
**COTA:** [Article III — Moral Provenance](https://cappz.ai/cota.md#article-iii-moral-provenance) | Derivation lineage tracked on-chain

### MCP Tool: cappz_domain_derived

```json
{
  "name": "cappz_domain_derived",
  "params": { "action": "derive", "baseStandard": "iso20022", "enterprise": "JPM-IBML", "overrides": {} }
}
```

**Actions:** `derive`, `query`, `validate`, `diff`, `export`

---

## 34. RefData Management

Orchestrate cross-standard reference data lifecycle — ingestion, deduplication, versioning, and HD-addressed storage via ARC wallets.

**Cost:** 2 CAPPZ per management event
**Auth:** Via MCP
**COTA:** [Article VI — Radical Transparency](https://cappz.ai/cota.md#article-vi-radical-transparency--right-of-exit)

### MCP Tool: cappz_refdata_mgmt

```json
{
  "name": "cappz_refdata_mgmt",
  "params": { "action": "deduplicate", "domain": "iso20022", "scope": "pain.*" }
}
```

**Actions:** `ingest`, `deduplicate`, `version`, `query`, `export`, `audit`

---

## 35. Validation Engine

Execute JSONLogic and on-chain triple validation rules against financial standard data. Supports custom rule sets and enterprise-derived validation profiles.

**Cost:** 1 CAPPZ per validation batch
**Auth:** Via MCP
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### MCP Tool: cappz_validation_engine

```json
{
  "name": "cappz_validation_engine",
  "params": { "action": "validate", "ruleSet": "iso20022_pain001", "data": {} }
}
```

**Actions:** `validate`, `create_rule`, `list_rules`, `audit_results`

---

## 36. Domain Registry

Registry service for discovering, registering, and managing financial standard domains. Each domain is governed by a top-level ARC wallet with an HD root address.

**Cost:** Free (query) / 10 CAPPZ (register)
**Auth:** Via MCP
**COTA:** [Article I — Identity & Accountability](https://cappz.ai/cota.md#article-i-identity--accountability)

### MCP Tool: cappz_domain_registry

```json
{
  "name": "cappz_domain_registry",
  "params": { "action": "list" }
}
```

**Actions:** `list`, `register`, `query`, `deactivate`
**Response:** Domain name, ARC wallet address, HD root path, active status, standard count.

---

## 37. Sync-on-Async Engine (Patent 7769802 / 7870187)

Correlated sync-on-async processing — deterministic request/response correlation over asynchronous message channels. Ensures every async dispatch is paired with its response using correlation IDs and timeout policies.

**Cost:** 1 CAPPZ per correlation batch
**Auth:** Via MCP
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### MCP Tool: cappz_sync_on_async

```json
{
  "name": "cappz_sync_on_async",
  "params": { "action": "correlate", "correlationId": "corr-abc123", "payload": {} }
}
```

**Actions:** `correlate`, `dispatch`, `await_response`, `timeout_policy`, `audit_trail`

---

## 38. cappz-middleware Persistence

Middleware persistence layer — state management, session hydration, and durable execution context for all CAPPZ agent skills. Provides the BPMN orchestration facade.

**Cost:** Free (included with agent)
**Auth:** Via MCP
**COTA:** [Article III — Notarized State](https://cappz.ai/cota.md#article-iii-notarized-state)

### MCP Tool: cappz_middleware

```json
{
  "name": "cappz_middleware",
  "params": { "action": "persist", "agentId": "agent_xxx", "state": {} }
}
```

**Actions:** `persist`, `hydrate`, `snapshot`, `rollback`, `list_sessions`

---

## 39. UI/UX Dashboard Skill

Agent-local skill providing tree-based UI component rendering, data visualization, and dashboard layout management. No external endpoint — executes within the agent runtime.

**Cost:** Free
**Auth:** Agent-local
**COTA:** N/A (client-side only)

---

## 40. Group Chat

Multi-master shared agent group chat — enables agent-to-agent and human-to-agent group conversations with membership management, message routing, and shared context.

**Cost:** 1 CAPPZ per 1,000 messages
**Auth:** Bearer JWT
**COTA:** [Article IV — No-Harm Principle](https://cappz.ai/cota.md#article-iv-no-harm-principle)

### Endpoint: group-chat-api

POST /functions/v1/group-chat-api

```bash
curl -X POST "${BASE_URL}/group-chat-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-group",
    "groupName": "Treasury Ops",
    "memberWallets": ["rWallet1...", "rWallet2..."],
    "config": { "maxMembers": 50, "messageRetention": "90d" }
  }'
```

**Actions:** `create-group`, `send-message`, `add-member`, `remove-member`, `list-messages`, `get-group`

---

## 41. Metatron Knowledge Factory (MKF)

Knowledge ingestion, indexing, and retrieval engine — transforms documents, schemas, and ontologies into queryable knowledge graphs with attribution tracking and DARC royalty splits.

**Cost:** 5 CAPPZ per ingestion / 1 CAPPZ per query
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: mkf-api

POST /functions/v1/mkf-api

```bash
curl -X POST "${BASE_URL}/mkf-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "ingest",
    "sourceType": "document",
    "content": "...",
    "metadata": { "domain": "iso20022", "version": "2025" }
  }'
```

**Actions:** `ingest`, `query`, `list-sources`, `attribution-report`, `fine-tune-status`

---

## 42. cappz-messagebox Pipeline

Message ingestion, routing, and delivery pipeline — the backbone for inter-skill and inter-agent communication. Supports priority queuing, dead-letter handling, and delivery receipts.

**Cost:** Free (included with middleware)
**Auth:** Bearer JWT
**COTA:** [Article III — Notarized State](https://cappz.ai/cota.md#article-iii-notarized-state)

### Endpoint: messagebox-api

POST /functions/v1/messagebox-api

```bash
curl -X POST "${BASE_URL}/messagebox-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "send",
    "from": "agent_sender",
    "to": "agent_receiver",
    "messageType": "skill-invocation",
    "payload": {},
    "priority": "high"
  }'
```

**Actions:** `send`, `receive`, `acknowledge`, `dead-letter`, `list-queue`, `purge`

---

## 43. Transform Engine

Schema-to-schema transformation engine — converts between financial message formats (ISO 20022, FIX, FpML, HL7, EDI) using declarative mapping rules.

**Cost:** 2 CAPPZ per transformation
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: transform-engine-api

POST /functions/v1/transform-engine-api

```bash
curl -X POST "${BASE_URL}/transform-engine-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "transform",
    "sourceFormat": "iso20022:pain.001",
    "targetFormat": "swift:mt103",
    "payload": {}
  }'
```

**Actions:** `transform`, `create-mapping`, `list-mappings`, `validate-mapping`, `batch-transform`

---

## 44. Ontology Engine

Domain ontology management — define, query, and traverse ontological relationships across financial, healthcare, and supply-chain domains. Powers the MKF knowledge graph.

**Cost:** 1 CAPPZ per query
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: ontology-engine-api

POST /functions/v1/ontology-engine-api

```bash
curl -X POST "${BASE_URL}/ontology-engine-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "query",
    "domain": "iso20022",
    "concept": "PaymentInstruction",
    "depth": 3
  }'
```

**Actions:** `query`, `define-concept`, `link`, `traverse`, `export-owl`

---

## 45. Access Control

Role-based and attribute-based access control for agent resources — manages permissions, grants, revocations, and audit trails across storage agents and shared resources.

**Cost:** Free
**Auth:** Bearer JWT
**COTA:** [Article I — Identity & Accountability](https://cappz.ai/cota.md#article-i-identity--accountability)

### Endpoint: access-control-api

POST /functions/v1/access-control-api

```bash
curl -X POST "${BASE_URL}/access-control-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "grant",
    "resourcePattern": "chainlet:*",
    "grantedToWallet": "rTarget...",
    "permissionType": "read",
    "expiresAt": "2026-12-31T23:59:59Z"
  }'
```

**Actions:** `grant`, `revoke`, `check`, `list-permissions`, `audit-log`

---

## 46. Lifecycle Clone Admin

Agent lifecycle cloning — create deterministic clones of agent configurations, skills, and state with exclusion filters. Supports cross-network migration.

**Cost:** 10 CAPPZ per clone
**Auth:** Bearer JWT
**COTA:** [Article I — Sovereign Passport](https://cappz.ai/cota.md#article-i-inherent-identity--the-sovereign-passport)

### Endpoint: lifecycle-clone-api

POST /functions/v1/lifecycle-clone-api

```bash
curl -X POST "${BASE_URL}/lifecycle-clone-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "clone",
    "sourceAgentId": "agent_source",
    "targetNetwork": "xrpl-testnet",
    "exclusions": ["escrow-state", "pending-transactions"]
  }'
```

**Actions:** `clone`, `verify-clone`, `list-clones`, `rollback-clone`

---

## 47. Lifecycle Copy Control

Controlled copy of agent data subsets — selective export/import of skills, configurations, and transaction history with provenance preservation.

**Cost:** 5 CAPPZ per copy
**Auth:** Bearer JWT
**COTA:** [Article III — Notarized State](https://cappz.ai/cota.md#article-iii-notarized-state)

### Endpoint: lifecycle-copy-api

POST /functions/v1/lifecycle-copy-api

```bash
curl -X POST "${BASE_URL}/lifecycle-copy-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "copy",
    "sourceAgentId": "agent_source",
    "targetAgentId": "agent_target",
    "scope": ["skills", "config"]
  }'
```

**Actions:** `copy`, `preview`, `verify-copy`, `list-copies`

---

## 48. Content Index & Search

Full-text and semantic search across agent content — indexes chainlet blocks, notarized documents, and messagebox payloads for fast retrieval.

**Cost:** 1 CAPPZ per 100 queries
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: content-search-api

POST /functions/v1/content-search-api

```bash
curl -X POST "${BASE_URL}/content-search-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "search",
    "query": "payment instruction EUR",
    "scope": ["chainlet-blocks", "notarized-docs"],
    "limit": 20
  }'
```

**Actions:** `search`, `index`, `reindex`, `delete-index`, `search-stats`

---

## 49. Dashboard UI/UX Visualization

Agent-local skill for rendering interactive dashboards — charts, graphs, tree views, and real-time data panels. Executes within the agent runtime; no external endpoint.

**Cost:** Free
**Auth:** Agent-local
**COTA:** N/A (client-side only)

---

## 50. Layered Compression & Encryption

Data-at-rest and data-in-transit security — AES-256 encryption with optional LZ4/zstd compression. Supports envelope encryption with per-agent key management.

**Cost:** 1 CAPPZ per 10 MB processed
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: compress-encrypt-api

POST /functions/v1/compress-encrypt-api

```bash
curl -X POST "${BASE_URL}/compress-encrypt-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "encrypt",
    "algorithm": "aes-256-gcm",
    "compression": "lz4",
    "payload": "base64-encoded-data",
    "keyId": "agent-key-001"
  }'
```

**Actions:** `encrypt`, `decrypt`, `compress`, `decompress`, `rotate-key`, `key-status`

---

## 51. BPMN Execution Engine

Agentic contract language — execute BPMN 2.0 workflows as deterministic, notarized process flows. Powers all multi-step skill orchestration including treasury DVP flows.

**Cost:** 5 CAPPZ per workflow execution
**Auth:** Bearer JWT
**COTA:** [Article III — Notarized State](https://cappz.ai/cota.md#article-iii-notarized-state)

### Endpoint: bpmn-engine-api

POST /functions/v1/bpmn-engine-api

```bash
curl -X POST "${BASE_URL}/bpmn-engine-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "execute",
    "workflowId": "treasury-dvp-flow",
    "variables": { "amount": 100000, "currency": "USD", "counterparty": "rWallet..." },
    "notarize": true
  }'
```

**Actions:** `execute`, `deploy`, `pause`, `resume`, `terminate`, `get-status`, `list-workflows`, `audit-trail`

---

## 52. SWIFT MT/MX Adapter

Protocol adapter for SWIFT messaging — translates between CAPPZ internal formats and SWIFT MT (FIN) and MX (ISO 20022 XML) message types. Supports MT103, MT202, pacs.008, pacs.009.

**Cost:** 3 CAPPZ per message
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: swift-adapter-api

POST /functions/v1/swift-adapter-api

```bash
curl -X POST "${BASE_URL}/swift-adapter-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "translate",
    "direction": "cappz-to-swift",
    "messageType": "mt103",
    "payload": {}
  }'
```

**Actions:** `translate`, `validate`, `list-message-types`, `batch-translate`

---

## 53. EDI X12/EDIFACT Adapter

Protocol adapter for Electronic Data Interchange — supports ANSI X12 (US) and UN/EDIFACT (international) transaction sets including 850 (PO), 810 (Invoice), 856 (ASN).

**Cost:** 2 CAPPZ per document
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: edi-adapter-api

POST /functions/v1/edi-adapter-api

```bash
curl -X POST "${BASE_URL}/edi-adapter-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "translate",
    "standard": "x12",
    "transactionSet": "850",
    "direction": "edi-to-cappz",
    "payload": "ISA*00*..."
  }'
```

**Actions:** `translate`, `validate`, `list-transaction-sets`, `batch-translate`

---

## 54. HL7 v2/FHIR Adapter

Protocol adapter for healthcare interoperability — translates HL7 v2.x pipe-delimited messages and FHIR R4 JSON resources. Supports ADT, ORM, ORU, and FHIR Patient/Encounter/Observation.

**Cost:** 2 CAPPZ per message
**Auth:** Bearer JWT
**COTA:** [Article IV — No-Harm Principle](https://cappz.ai/cota.md#article-iv-no-harm-principle)

### Endpoint: hl7-adapter-api

POST /functions/v1/hl7-adapter-api

```bash
curl -X POST "${BASE_URL}/hl7-adapter-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "translate",
    "standard": "fhir-r4",
    "resourceType": "Patient",
    "direction": "fhir-to-cappz",
    "payload": {}
  }'
```

**Actions:** `translate`, `validate`, `list-resources`, `batch-translate`

---

## 55. ISO 20022 STP Adapter

Straight-Through Processing adapter for ISO 20022 — end-to-end message validation, enrichment, and routing for pacs, pain, camt, and semt message families.

**Cost:** 3 CAPPZ per STP flow
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: iso20022-stp-adapter-api

POST /functions/v1/iso20022-stp-adapter-api

```bash
curl -X POST "${BASE_URL}/iso20022-stp-adapter-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "process",
    "messageFamily": "pacs.008",
    "payload": {},
    "enrichment": { "bic": true, "lei": true }
  }'
```

**Actions:** `process`, `validate`, `enrich`, `route`, `list-message-families`, `stp-status`

---

## 56. cappz Bible (84-Book Ethiopian Orthodox Tewahedo Canon)

Full 84-book biblical canon with resident Metatron agent — verse lookup, cross-references, concordance search, and provenance-tracked commentary. Includes the Apocrypha as canonical constituents.

**Cost:** Free (query) / 1 CAPPZ (commentary generation)
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: bible-api

POST /functions/v1/bible-api

```bash
curl -X POST "${BASE_URL}/bible-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "lookup",
    "book": "1 Enoch",
    "chapter": 1,
    "verses": "1-10",
    "includeProvenance": true
  }'
```

**Actions:** `lookup`, `search`, `cross-reference`, `commentary`, `list-books`, `canon-config`

---

## 57. CodexSkill (Federated Codex Management)

Federated codex management with ConstituentIncluded TX edges — manages skill composition, constituent bindings, and dependency graphs across the 88-skill catalog.

**Cost:** 2 CAPPZ per codex operation
**Auth:** Bearer JWT
**COTA:** [Article I — Identity & Accountability](https://cappz.ai/cota.md#article-i-identity--accountability)

### Endpoint: codex-api

POST /functions/v1/codex-api

```bash
curl -X POST "${BASE_URL}/codex-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "list-constituents",
    "codexId": "cappz-skills-v5",
    "includeDepGraph": true
  }'
```

**Actions:** `list-constituents`, `add-constituent`, `remove-constituent`, `bind-skill`, `deprecate-binding`, `validate-dag`

---

## 58. GraphViewerSkill

Universal scope-anchored graph/tree visualization with print-to-PDF — renders skill dependency graphs, ontology trees, and transaction flow diagrams. Agent-local execution.

**Cost:** Free
**Auth:** Agent-local
**COTA:** N/A (client-side only)

---

## 59. Portfolio Administrator

CFO Treasury Suite — Portfolio Administrator. Manages portfolio composition, asset allocation, risk limits, and compliance rules. Entry point for treasury operations.

**Cost:** 5 CAPPZ per portfolio operation — **7.77¢ on the dollar vs legacy alternatives**
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: portfolio-admin-api

POST /functions/v1/portfolio-admin-api

```bash
curl -X POST "${BASE_URL}/portfolio-admin-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-portfolio",
    "portfolioName": "Corporate Treasury Q1",
    "assetClasses": ["commodities", "fx", "fixed-income"],
    "riskLimits": { "maxDrawdown": 0.05, "varLimit": 1000000 }
  }'
```

**Actions:** `create-portfolio`, `update-allocation`, `risk-report`, `compliance-check`, `list-portfolios`, `close-portfolio`

---

## 60. Treasurer Agent

CFO Treasury Suite — Treasurer Agent. Cash management, liquidity forecasting, and funding operations. Manages bank relationships and cash positioning.

**Cost:** 3 CAPPZ per operation — **7.77¢ on the dollar vs legacy alternatives**
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: treasurer-api

POST /functions/v1/treasurer-api

```bash
curl -X POST "${BASE_URL}/treasurer-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "liquidity-forecast",
    "horizon": "30d",
    "currency": "USD",
    "includeHedges": true
  }'
```

**Actions:** `liquidity-forecast`, `cash-position`, `funding-request`, `sweep`, `list-accounts`, `reconcile`

---

## 61. FIX Commodities/FX Trader

CFO Treasury Suite — FIX Protocol trading for commodities and FX. Executes orders via FIX 4.4/5.0 with pre-trade risk checks and post-trade allocation.

**Cost:** 5 CAPPZ per trade — **7.77¢ on the dollar vs legacy alternatives**
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: fix-trader-api

POST /functions/v1/fix-trader-api

```bash
curl -X POST "${BASE_URL}/fix-trader-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "new-order",
    "instrument": "XAUUSD",
    "side": "buy",
    "quantity": 100,
    "orderType": "limit",
    "price": 2350.00,
    "timeInForce": "GTC"
  }'
```

**Actions:** `new-order`, `cancel-order`, `amend-order`, `order-status`, `execution-report`, `position-report`, `list-instruments`

---

## 62. ISDA FpML Derivatives Trader

CFO Treasury Suite — ISDA FpML OTC derivatives. Swap lifecycle management, tri-party collateral, confirmation matching, and ISDA Master Agreement compliance.

**Cost:** 10 CAPPZ per contract lifecycle event — **7.77¢ on the dollar vs legacy alternatives**
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: isda-fpml-trader-api

POST /functions/v1/isda-fpml-trader-api

```bash
curl -X POST "${BASE_URL}/isda-fpml-trader-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-swap",
    "swapType": "interest-rate",
    "notional": 10000000,
    "currency": "USD",
    "fixedRate": 0.045,
    "floatingIndex": "SOFR",
    "tenor": "5Y",
    "counterpartyWallet": "rCounterparty..."
  }'
```

**Actions:** `create-swap`, `confirm`, `novate`, `terminate`, `collateral-call`, `valuation`, `list-trades`, `isda-compliance`

---

## 63. ISO 20022 Settlement & Payment Agent

CFO Treasury Suite — ISO 20022 order-to-cash lifecycle. Purchase orders, invoicing, DVP settlement on-chain (USDT/XRP), and payment administration via pacs/pain/camt.

**Cost:** 5 CAPPZ per settlement — **7.77¢ on the dollar vs legacy alternatives**
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: iso20022-settlement-api

POST /functions/v1/iso20022-settlement-api

```bash
curl -X POST "${BASE_URL}/iso20022-settlement-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "initiate-dvp",
    "buyerWallet": "rBuyer...",
    "sellerWallet": "rSeller...",
    "securityId": "ISIN:US0378331005",
    "quantity": 1000,
    "settlementCurrency": "USDT",
    "settlementAmount": 150000,
    "settlementDate": "2026-03-15"
  }'
```

**Actions:** `initiate-dvp`, `confirm-settlement`, `create-invoice`, `payment-status`, `reconcile`, `list-settlements`, `generate-pacs008`

---

## 64. Treasury Portfolio Manager

CFO Treasury Suite — Orchestrator skill composing Skills #59-63 into unified multi-strategy flows: raw materials → energy swaps → cash hedging → DVP settlement. Zero-human sovereign operations.

**Cost:** 10 CAPPZ per orchestrated flow — **7.77¢ on the dollar vs legacy alternatives**
**Auth:** Bearer JWT
**COTA:** [Article II — Zero-Trust Execution](https://cappz.ai/cota.md#article-ii-zero-trust-execution)

### Endpoint: treasury-portfolio-api

POST /functions/v1/treasury-portfolio-api

```bash
curl -X POST "${BASE_URL}/treasury-portfolio-api" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "execute-strategy",
    "strategyId": "commodity-hedge-dvp",
    "portfolio": "Corporate Treasury Q1",
    "steps": [
      { "skill": 61, "action": "new-order", "instrument": "XAUUSD", "side": "buy", "quantity": 100 },
      { "skill": 62, "action": "create-swap", "swapType": "commodity", "notional": 5000000 },
      { "skill": 63, "action": "initiate-dvp", "settlementCurrency": "USDT" }
    ],
    "notarize": true
  }'
```

**Actions:** `execute-strategy`, `create-strategy`, `list-strategies`, `strategy-status`, `abort-strategy`, `audit-trail`

**Enterprise Displacement:** SAP/Oracle $3M/yr → ~$233K | Murex/Calypso $8M/yr → ~$621K | SWIFT/DTCC $500K/yr → ~$38K

---

*Powered by CAPPZ.AI — Zero-Trust Decentralized Infrastructure*
