Skip to main content

Crate zk402_core

Crate zk402_core 

Source
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§

PaymentPayload
Complete payment payload sent by the payer.
PaymentRequirements
Payment requirements from the payee, matching the x402 wire format.
PublicInputs
Public inputs to the zero-knowledge proof.
SettleResponse
Response from the settle endpoint.
VerifyResponse
Response from the verify endpoint.
Witness
Witness data for proof generation (private inputs).
ZkExtra
ZK-specific fields within PaymentRequirements.extra.

Enums§

ProofSystemError
SchemeError

Traits§

ProofSystem
Abstract proof system backend — the primary swap point in the architecture.
Scheme
Scheme trait matching the shape existing facilitator implementations use.
VerifyingKeyRegistry
Verifying key registry — the trust model swap point.

Type Aliases§

Address