Skip to content

[codex] add zcash x402 binding#31

Draft
Svaag wants to merge 1 commit into
mainfrom
codex/zcash-x402-binding
Draft

[codex] add zcash x402 binding#31
Svaag wants to merge 1 commit into
mainfrom
codex/zcash-x402-binding

Conversation

@Svaag

@Svaag Svaag commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a custom x402 v2 Zcash binding for Hyrule Cloud.

  • Implements exact native ZEC requirements using CAIP-2 Zcash network IDs and slip44:133.
  • Adds merchant-hosted Zcash invoice persistence and verification through wallet-visible z_viewtransaction outputs.
  • Wires Zcash invoice minting into the existing PaymentGate, including PAYMENT-REQUIRED, PAYMENT-SIGNATURE, and PAYMENT-RESPONSE handling.
  • Adds /x402/zcash/supported, /verify, and /settle facilitator endpoints.
  • Advertises Zcash in /v1/payments/networks and /.well-known/x402.json when enabled.
  • Commits the original implementation plan at docs/plans/2026-07-01-zcash-x402-v2-binding.md.

Impact

Operators can enable client-broadcast Zcash payments with a merchant-hosted verifier backed by a zcashd wallet view. Shielded ZEC is treated differently from public-chain rails: txid-only public verification is not assumed.

Validation

  • uv run ruff check hyrule_cloud tests/test_zcash_x402.py tests/test_payment_gate_x402.py tests/test_payments_networks.py
  • uv run pytest

Svaag commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Original implementation plan committed in this PR:

docs/plans/2026-07-01-zcash-x402-v2-binding.md

That file captures the Zcash-specific x402 architecture, including the shielded-payment verification caveat, client-broadcast flow, facilitator behavior, invoice binding, replay protection, and phased MVP rollout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant