Module payment

Module payment 

Source
Expand description

Payment verification system for saorsa-node.

This module implements the payment verification strategy:

  1. Check LRU cache for already-verified data
  2. Require and verify EVM/Arbitrum payment for new data

§Architecture

PUT request received
       │
       ▼
┌─────────────────────┐
│ Check LRU cache     │
└─────────┬───────────┘
          │
   ┌──────┴──────┐
   │             │
  HIT          MISS
   │             │
   ▼             ▼
Store (paid)   Require EVM payment

§Payment Flow

All new data requires EVM payment:

  1. Client requests a quote from the node
  2. Node generates PaymentQuote with ML-DSA-65 signature
  3. Client pays on Arbitrum via PaymentVault.payForQuotes()
  4. Client sends PUT with ProofOfPayment
  5. Node verifies on-chain payment and stores data

Re-exports§

pub use metrics::QuotingMetricsTracker;
pub use quote::verify_quote_content;
pub use quote::QuoteGenerator;
pub use quote::XorName;
pub use wallet::is_valid_address;
pub use wallet::parse_rewards_address;
pub use wallet::WalletConfig;

Modules§

metrics
Quoting metrics tracking for saorsa-node.
quote
Payment quote generation for saorsa-node.
wallet
EVM wallet management for receiving payments.

Structs§

PaymentVerifier
Main payment verifier for saorsa-node.
PaymentVerifierConfig
Configuration for the payment verifier.
VerifiedCache
LRU cache for verified XorName values.

Enums§

PaymentStatus
Status returned by payment verification.