Expand description
Core types and traits for the zk402 payment scheme.
This crate defines the wire format types, the ProofSystem trait boundary,
the VerifyingKeyRegistry trust model, and the Scheme trait that facilitators
implement. It has zero proving-library dependencies — all cryptographic backends
are swappable.
Structs§
- Payment
Payload - Complete payment payload sent by the payer.
- Payment
Requirements - Payment requirements from the payee, matching the x402 wire format.
- Public
Inputs - Public inputs to the zero-knowledge proof.
- Settle
Response - Response from the settle endpoint.
- Verify
Response - Response from the verify endpoint.
- Witness
- Witness data for proof generation (private inputs).
- ZkExtra
- ZK-specific fields within
PaymentRequirements.extra.
Enums§
Traits§
- Proof
System - Abstract proof system backend — the primary swap point in the architecture.
- Scheme
- Scheme trait matching the shape existing facilitator implementations use.
- Verifying
KeyRegistry - Verifying key registry — the trust model swap point.