Expand description
MPP (Machine Payments Protocol) HTTP transport.
Wraps a standard reqwest HTTP transport with automatic 402 Payment Required handling via the MPP protocol. When the RPC endpoint returns a 402 response, this transport automatically pays the challenge and retries the request.
Structsยง
- Lazy
Session Provider - A payment provider that lazily initializes a
SessionProviderfrom the Tempo wallet configuration on first use. - MppHttp
Transport - HTTP transport with automatic MPP (Machine Payments Protocol) 402 handling.
Constantsยง
- DEFAULT_
DEPOSIT ๐ - Default deposit amount for new channels (in base units).
- MPP_
RETRY_ ๐TIMEOUT - Timeout for MPP retry requests (open/topUp may wait for on-chain settlement).
Staticsยง
- GLOBAL_
PAY_ ๐LOCKS - Process-wide payment serialization locks, keyed by origin URL.
Traitsยง
- Resolve
Provider ๐ - Trait for resolving a concrete
PaymentProviderfrom a potentially lazy wrapper.
Functionsยง
- default_
deposit ๐ - Resolve the deposit amount from
MPP_DEPOSITenv var or the default. - extract_
challenge_ ๐chain_ and_ currency - Extract
(chainId, currency)from a parsed MPP challenge. - format_
http_ ๐diagnostics
Type Aliasesยง
- Lazy
MppHttp Transport - Production transport: lazily discovers MPP keys from the Tempo wallet on first 402 response.