Further reading

Where to learn more: x402 and its Bazaar, the Zcash protocol and ZIPs, Zebra, Zaino and Zallet, the standards z402 uses and the tools behind these docs.

On this page

z402 builds on open standards and open source. This page lists what to read next, and why each item matters to the project.

x402

z402 is a payment scheme for x402, so the standard comes first.

  • x402.org: The home of the open standard. A server answers HTTP 402 with what it accepts, the client pays and retries, and z402 adds a Zcash scheme to that loop.
  • x402 Foundation repository: The canonical repository, with the specification, the TypeScript SDK that z402 pins to exactly 2.28.0 and the examples. coinbase/x402, where the project began, is now a development fork.
  • x402 specification, version 2: The types, headers, facilitator calls and error codes that prepaid-voucher extends. The same file is in coinbase/x402.
  • x402 HTTP transport, version 2: How PAYMENT-REQUIRED, PAYMENT-SIGNATURE and PAYMENT-RESPONSE travel over HTTP.
  • The bazaar extension: What a route declares in its 402 so that a catalog can list it. The facilitator's catalog reads exactly this.
  • x402 on the Coinbase Developer Platform: A seller's and a buyer's view of how x402 works, in plain language.
  • Discover services (Bazaar): How buyers list and search the x402 Bazaar. The facilitator's GET /discovery/resources and GET /discovery/search follow the same model, so a standard Bazaar client reads them.

See x402 and HTTP 402 for how z402 uses the standard, and Discovery for its Bazaar.

Zcash

Deposits are shielded Zcash transactions, so these explain what the chain does with them.

See Shielded payments and Privacy model.

Chain software

The demo runs a private Zcash chain with the Z3 stack, and the facilitator reads it through the same interfaces a mainnet node would offer.

  • Zebra and the Zebra Book: The Zcash full node, written in Rust by the Zcash Foundation. The demo's private chain runs on it.
  • Zaino: The indexer in front of Zebra. The facilitator, the client and the drop box read deposits and the chain tip from it, over the lightwalletd gRPC protocol.
  • Zallet: The wallet with a JSON-RPC interface. It holds the demo agent's funds and sends its deposits through ZalletRpcWallet.
  • Z3: The Zcash Foundation's combination of Zebra, Zaino and Zallet. The Docker demo is built on it.
  • lightwalletd and lightwallet-protocol: The gRPC interface for compact blocks and transactions. @z402-net/lightwalletd speaks it to look up a deposit and read the tip.

See Deploy with Docker to run the whole stack.

Standards on the wire

Formats and tools

Prior art

z402 credits the projects that did shielded x402 first. Its decryptor follows the decrypt loop of both.

  • Kage: Agents pay for HTTP APIs with shielded Zcash on x402 version 1, with a facilitator that holds only a viewing key. z402 differs by using an unmodified x402 version 2 client and a trust ramp in place of a wait for one confirmation.
  • Hanko: A library that verifies shielded Zcash payments with a viewing key.

In this repository

These files are the sources of truth. The docs summarise them, and they carry the detail and the history.

  • docs/spec/protocol.md: The wire contract between the client, the server scheme and the facilitator.
  • docs/superpowers/specs/2026-10-27-z402-facilitator-design.md: How the facilitator checks deposits, runs the trust ramp and keeps its ledger.
  • docs/superpowers/specs/2026-10-27-z402-client-design.md: How the client keeps sessions, deposits and recovers from refusals.
  • docs/superpowers/specs/2026-10-27-z402-services-design.md: The service kit and the four starter services.
  • docs/superpowers/specs/2026-10-28-z402-multi-provider-design.md: The multi-provider rail: providers, API keys, per-route prices and the Bazaar.
  • docs/deploy.md: The Docker runbook, with ports, settings and how to wipe and restart.
  • docs/demo.md: The demo script: what each log line means and what to point at.
  • docs/research/live-run.md: What a live run on the Z3 stack showed.

References

  • docs/research/x402-spec.md: the x402 version 2 types and error codes, and the move of the canonical repository
  • docs/research/client/z3.md: the Z3 stack and its components
  • docs/research/decrypt-spike.md: Ironwood, trial decryption and the ZIP 317 fee of a deposit
  • docs/spec/mvp-build-doc.md: the credits to Kage and Hanko, and the ZIP 315 wallet note
  • docs/superpowers/specs/2026-10-28-z402-multi-provider-design.md: the mention of ZIP 311 as future work
  • packages/lightwalletd/src/index.ts: the lightwalletd client that @z402-net/lightwalletd exports