bsv-payment-actix-middleware 0.1.0

BSV payment middleware for Actix-web, wire-compatible with the TypeScript payment-express-middleware
Documentation
#![warn(missing_docs)]
//! BSV payment middleware for Actix-web.
//!
//! Wire-compatible with the TypeScript `payment-express-middleware`. Enforces
//! BSV micropayments on protected routes by verifying payment headers, deriving
//! keys, and internalizing transactions via a [`WalletInterface`] implementation.
//!
//! [`WalletInterface`]: bsv::wallet::interfaces::WalletInterface

pub mod config;
pub mod error;
pub mod extractor;
pub mod middleware;
pub mod types;

#[cfg(feature = "bridge")]
pub mod bridge;

pub use config::{PaymentMiddlewareConfig, PaymentMiddlewareConfigBuilder};
pub use error::PaymentError;
pub use extractor::AuthIdentity;
pub use middleware::{PaymentMiddlewareFactory, PaymentMiddlewareService};
pub use types::{
    BSVPayment, CalculateRequestPrice, PaymentInfo, DEFAULT_SATOSHIS, PAYMENT_VERSION,
};

#[cfg(feature = "bridge")]
pub use bridge::{AuthToPaymentBridge, AuthToPaymentBridgeService};