Skip to main content

ant_protocol/payment/
mod.rs

1//! Wire-side payment artifacts shared by client and node.
2//!
3//! This module holds the types and helpers that both the client (when
4//! building a payment proof for a PUT request) and the node (when
5//! verifying that proof before storing a chunk) must agree on.
6//!
7//! The analogue in `evmlib` is the co-location of `pay` and `verify`
8//! on `PaymentVault` — keeping both halves in one crate means the
9//! encoding, validation, and on-chain interaction are tested end to end.
10
11/// Payment proof serialization and type tagging.
12pub mod proof;
13/// `SingleNodePayment` construction, on-chain payment, and verification.
14pub mod single_node;
15/// Pure ML-DSA-65 verification helpers for quotes and merkle candidates.
16pub mod verify;
17
18pub use proof::{
19    deserialize_merkle_proof, deserialize_proof, detect_proof_type, serialize_merkle_proof,
20    serialize_single_node_proof, PaymentProof, ProofType,
21};
22pub use single_node::{QuotePaymentInfo, SingleNodePayment};
23pub use verify::{verify_merkle_candidate_signature, verify_quote_content, verify_quote_signature};