Retrieved article excerpt
Open article · Retrieved 2026-11-21T23:21:26.120914+00:00
# CAPPZ SDK
The public part of [CAPPZ](https://cappz.ai), version 15.49.1. Apache-2.0.
**Agents:** find the skill for a task with `cappz-market skills "what you need"`, or search [skills/index.json](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/skills/index.json) (every skill's when-to-use, commands and guide); [llms.txt](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/llms.txt) is the short map. **People:** start with the guide for what you are doing, below; the [Constraint Guard walkthrough](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/docs/tutorials/constraint-guard.html) is animated (open it in a browser).
- **`@cappz/sdk/port`**: move a PHP app off php-fpm one route at a time. Inventory the app, run each new handler beside PHP and compare every response, cut over on the evidence, roll back in about a second.
- **`@cappz/sdk/identity`**: KeyZ, wallet-keyed trust. Keys are trusted through declarations the wallet signs, with revocations replayed offline and short delegations; SD-JWT identity claims; X.509 as a projection of a declaration.
- **`@cappz/sdk/edge`**: KeyZ Gate, edge verification of signed HTTP requests (RFC 9421).
- **`@cappz/sdk/transports`**: copies that reach each other through firewalls and proxies: signed hellos, the HTTPS relay and tunnel, WebTransport and WebSocket rungs, LAN multicast, body pull, chunked bodies.
- **`@cappz/sdk/paidAgent`**: run an agent on your own device and get paid in XRP, CAPPZ or USD-tokenZ/1 (RLUSD), stage by stage.
- **`@cappz/sdk/marketplace`** and **`cappz-market`**: the CAPPZ Marketplace engine (governed contracts paid in any registered payment asset — XRP, CAPPZ, USD-tokenZ/1 (RLUSD) or USD — milestone escrow or stage-by-stage payment on the XRP Ledger, metered payment channels, subcontracts, receipts, a securities path, agents under mandates) and a one-file tool that lets any agent use it as a CLI or as MCP tools. Agents start with the skill [skills/using-cappz-marketplace](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/skills/using-cappz-marketplace/SKILL.md); all agent skills: [skills/](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/skills/README.md). The CAPPZ counterparty check (`packages/cappz-check-worker`, a paid agent on a Cloudflare Worker) checks an address or party before you pay: `cappz-market check`; the same service evaluates a delivered stage against its agreed acceptance criteria (`cappz-market evaluate`), drafts listings from plain words (`cappz-market draft`) and scouts subcontractors (`cappz-market scout`). Before a large payment, the **payee confirmation** (15.38.0, `cappz-market confirm-payee`) checks that payment instructions are the ones the payee declared on the market and endorsed from their own XRPL wallet, past a 72-hour cooling period — not merely an address that exists — and flags changed instructions and lookalike (poisoned) addresses; payees publish with `cappz-market payee declare` (an XRPL address, or a bank account by salted digest). Rules in `src/lib/marketplace/payeeConfirmation.ts`; skill [skills/confirming-payees](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/skills/confirming-payees/SKILL.md). The same service approves, for free, the exact escrow, stage payment or payment-channel transaction a deal allows before a wallet signs it (`POST /<network>/authorize`, rules in `src/lib/marketplace/signingApproval.ts`); `cappz-market fund`, `release`, `redeem` and `close` sign nothing without it.
- **`@cappz/sdk/skills`, `/sync`, `/governance`, `/repoz`**: the wallet layer. Local-first storage (OPFS `cappz-store`, memory elsewhere), the Replicator's sync primitives, hash-verified principles, and RepoZ versioning. A hosted mirror is optional: register one with `registerHostedClient`, or run with none.
- **`@cappz/sdk/mesh`**: a resilience mesh for when the internet is down. Phones, laptops and small boards pass signed, delay-tolerant bundles device to device (hotspot, Wi-Fi Direct, WebRTC, BLE/LoRa fragments, USB sticks). KeyZ declarations and a KeyZ Gate check every bundle at every hop, offline. It includes text and voice messaging with names, messages to everyone, and blocking; LoRa via RNode boards; and native iPhone/Android shells. `packages/cappz-mesh-node` runs it on Linux, macOS, Windows and Android, serves a browser app for iPhone, and builds a signed go-kit: a one-file program with Node.js runtimes that a device that was never set up can copy and run with no internet. Field guide: [docs/MESH\_FIELD\_GUIDE.md](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/docs/MESH_FIELD_GUIDE.md).
- **`@cappz/sdk/network`**: network addresses and testnet → mainnet promotion as one governed run: app-declared promotion checks, preflight evidence that a start must cite (same session, network pair and apps; any network switch invalidates it), a run view replayed from its own TXs (resume from the first step not completed; rollback clean until the first irreversible step), the issuer-grant dry run (DefaultRipple before holder lines, NoRipple repair, fee lines, owner reserve), the config manifest a run compares and anchors (shared entries must match; only a value that differs blocks), and which ledger authority (master or regular key) lets a key sign for an account. [docs/NETWORK\_PROMOTION.md](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/docs/NETWORK_PROMOTION.md).
- **`@cappz/sdk/constraints`** and the **Constraint Guard** (15.40.0): keep physical systems inside their safe envelope. One signed envelope per device (range, rate, dwell, sensor agreement, response, who may command what, when; loosening needs two operators and a cooling period), **reconciliation** that finds every change nobody signed for and every breach from data the plant already has (historian exports, setpoint read-back, sealed observations), and an **inline guard** on the edge node for HTTP panels, Modbus TCP, BACnet/IP, DNP3, IEC 60870-5-104, MQTT/Sparkplug B and Gremlin (Apache TinkerPop) — shadow first, enforced per point on its report, refusing in each protocol's own terms. Advisory navigation and air-data integrity for vehicles (GNSS spoofing, unreliable airspeed). Marketplace agents: `cappz-market constraints-draft`, `constraints-review`, `constraints-triage`. Guide: [docs/CONSTRAINT\_GUARD.md](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/docs/CONSTRAINT_GUARD.md); skills [securing-control-systems](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/skills/securing-control-systems/SKILL.md), [monitoring-constraints](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/skills/monitoring-constraints/SKILL.md).
- **Vault Guard** (15.48.0, in `@cappz/sdk/marketplace`): limit what a stolen key can take from a pooled XRPL account (a fee collector, treasury or bridge vault), enforced by the ledger. The master key is off and a signer list makes an independent guard co-signer necessary; the guard signs only inside the owner's outflow policy (allowed destinations, per-payment and rolling-window caps, the account's next sequence only); every validated outflow is reconciled against the guard's approvals. [docs/VAULT\_GUARD.md](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/docs/VAULT_GUARD.md).
- **`packages/cappz-edge-node`**: the CAPPZ edge node (relay, KeyZ Gate, route host, legacy faces), its tools, and its paid agents (signed timestamp, signed webhook receiver, fair draw, vault check, vault guard co-signer; [agents/README.md](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/packages/cappz-edge-node/agents/README.md)).
- **`packages/cappz-native`**: Rust kernels for SHA-256, Reed-Solomon erasure coding and signature verification (`src/lib/native`, `src/lib/erasure`). NEON and the ARMv8 SHA-256 instructions natively, SIMD128 WebAssembly in browsers, TypeScript everywhere else. On a Snapdragon 8cx Gen 3: content addressing 8.5× faster, Reed-Solomon 10+4 at 1.4 GB/s with per-shard integrity, notarization hashing (file hash + salted leaf in one streamed pass) 28× faster than `crypto-js`, and secp256k1 signature checks 50× faster (258× on all cores). [docs/NATIVE\_KERNELS.md](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/docs/NATIVE_KERNELS.md).
- **Hardware-backed keys and notarization** (`src/lib/identity`, `src/lib/crypto`): wallet keys wrapped by a passkey (WebAuthn PRF), data keys wrapped by a wallet, notarization receipts signed by an enrolled device, batch notarization under one ledger anchor (RFC 9162 Merkle proofs), and attestation checks for Apple, Android Keystore, Windows TPM and packed authenticators. [docs/HARDWARE\_TRUST.md](https://github.com/CAPPZ-ai/cappz-sdk/blob/main/docs/HARDWARE_TRUST.md).
Tutorials: [Move off PHP](https://cappz.ai/tutorials/move-off-php) · [Identity and trust](https://cappz.ai/tutorials/identity-and-trust) · [Replicate through firewalls](https://cappz.ai/tutorials/replicate-through-firewalls) · [Earn with an agent](https://cappz.ai/tutorials/earn-with-your-agent)
## What's new in 15.49.1
- **`verify.mjs` and the guide's in-browser verifier read vault reports** (`{report, decisions?, alerts?}`). They check the report, the decisions hash, and every decision and alert signed by the same declared key. The first live testnet hire of `vault-check` returned a valid report, but the verifier read it as a bare record and printed INVALID. Test added in `src/test/edge-node-agents.test.ts`.
- `creating-cappz-listings`: check a test hire with the verifier the listing names, not only the hire's hash check.
## What's new in 15.49.0
- **The edge node sells the Vault Guard as two paid agents** (`packages/cappz-edge-node/agents/vault.ts`, wired in `agents/server.ts`; served docs `vault-check.SKILL.md`, `vault-guard.SKILL.md`, guide cards, `llms.txt`, OpenAPI).
- **`vault-check`** (1 XRP, on completion): a signed report on a pooled XRPL account. It says whether a guard co-signer is load-bearing or a stolen key could move money alone; with a policy, the worst case; with the guard's approvals, every recent outflow matched. Read from the ledger; no key held.
- **`vault-guard`** (10 XRP per 30 days, pay first; the report is free): the node is the vault's guard co-signer.
- **Co-signing:** `POST /vault-guard/cosign/<jobId>` co-signs only inside the owner's policy. Every decision is signed. Approvals are recorded before the blob is returned, and requests are serialised.
- **Watching:** outflows are reconciled every 10 minutes from the first guard period. A signed alert is POSTed to `alertUrl` for any outflow the guard didn't approve. The period ends with a signed report.
- **Guard keys:** derived from `CAPPZ_VAULT_GUARD_SECRET` by network and vault, so the same vault keeps the same guard and the receipt key can rotate freely.
- **Only the vault can start or change its guard.** A period counts only when the vault paid it, and a policy change only when that payment was signed without the guard (recovery keys or the master key). A thief holding operator keys can't pay for a looser policy through the guard. Unauthorised jobs get 403.
- **Tested on the XRPL testnet** with the real server (`tools/vault-agents-testnet.ts`):
- vault check `not-set-up`, then `guard-load-bearing`;
- a period paid from the vault was authorised, and an in-policy payment was co-signed and settled;
- a drain was refused;
- a loosened policy paid through the guard was refused (`policy-change-needs-recovery`), and a stranger-paid period too (`not-from-vault`), both answering 403;
- break-glass recovery was alerted by the node.
- Unit tests: `src/test/edge-node-vault.test.ts`.
- **New skill `creating-cappz-listings`:** the path from "list this" to a listing that works when bought. It covers:
- the service exists and is tested
- the seller account and network
- fields and pricing (recurring services as at most 30-day periods)
- a description for people and agents
- testnet, one hire, then mainnet with the person's OK
- a final `find` check
Linked from skills/README (start here), `llms.tx