Expand description
mpp - Machine Payment Protocol for Rust
A Rust library implementing the Web Payment Auth protocol.
§Quick Start
use mpp_br::{PaymentChallenge, PaymentCredential, Receipt, ChargeRequest};
use mpp_br::{parse_www_authenticate, format_authorization};§Signer Integration
ⓘ
use mpp_br::{Signer, PrivateKeySigner};Consumers provide their own signer. The library does not manage keystores.
Re-exports§
pub use error::MppError;pub use error::Result;pub use error::PaymentError;pub use error::PaymentErrorDetails;pub use error::CORE_PROBLEM_TYPE_BASE;pub use error::SESSION_PROBLEM_TYPE_BASE;pub use error::STREAM_PROBLEM_TYPE_BASE;Deprecated pub use protocol::core::compute_challenge_id;pub use protocol::core::ChallengeEcho;pub use protocol::core::PaymentChallenge;pub use protocol::core::PaymentCredential;pub use protocol::core::PaymentPayload;pub use protocol::core::Receipt;pub use protocol::core::ReceiptStatus;pub use protocol::core::format_receipt;pub use protocol::core::format_www_authenticate;pub use protocol::core::format_www_authenticate_many;pub use protocol::core::parse_receipt;pub use protocol::core::parse_www_authenticate;pub use protocol::core::parse_www_authenticate_all;pub use protocol::core::base64url_decode;pub use protocol::core::base64url_encode;pub use protocol::core::Base64UrlJson;pub use protocol::core::IntentName;pub use protocol::core::MethodName;pub use protocol::core::PayloadType;pub use protocol::core::PaymentProtocol;pub use protocol::core::AUTHORIZATION_HEADER;pub use protocol::core::PAYMENT_RECEIPT_HEADER;pub use protocol::core::PAYMENT_SCHEME;pub use protocol::core::WWW_AUTHENTICATE_HEADER;pub use store::FileStore;pub use store::MemoryStore;pub use store::Store;pub use store::StoreError;pub use protocol::intents::deserialize_request;pub use protocol::intents::deserialize_request_typed;pub use protocol::intents::parse_units;pub use protocol::intents::request_from_challenge;pub use protocol::intents::request_from_challenge_typed;pub use protocol::intents::serialize_request;pub use protocol::intents::ChargeRequest;pub use protocol::intents::Request as PaymentRequest;pub use protocol::intents::SessionRequest;
Modules§
- body_
digest - Body digest computation and verification.
- error
- Error types for the mpp library.
- expires
- Expiration time helpers.
- mcp
- MCP (Model Context Protocol) support for Web Payment Auth.
- protocol
- Payment protocol implementations for Web Payment Auth (IETF draft-ietf-httpauth-payment).
- proxy
- Paid API proxy that gates upstream services behind the 402 protocol.
- store
- Pluggable key-value store abstraction.