feat: add MPP payment layer#3835
Closed
stevencartavia wants to merge 5 commits intoalloy-rs:mainfrom
Closed
Conversation
Adds MPP 402 payment handling to alloy's HTTP and WS transports. - MppLayer<P> + MppService<S,P> — tower middleware for hyper that intercepts 402 responses, parses the Payment challenge, calls provider.pay(), and retries with an Authorization header - MppReqwestClient<P> — reqwest transport with built-in 402 interception - MppWsConnect<P> — wraps WsConnect, handles 402 during WS upgrade handshake - mpp-tempo feature adds with_tempo_signer / with_tempo_access_key convenience constructors on all three types Amp-Thread-ID: https://ampcode.com/threads/T-019d2306-2d81-77e8-84af-41a35f908648 Co-authored-by: Amp <amp@ampcode.com>
606e69d to
3c53702
Compare
Amp-Thread-ID: https://ampcode.com/threads/T-019d2306-2d81-77e8-84af-41a35f908648 Co-authored-by: Amp <amp@ampcode.com>
fb4c2f7 to
93859d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds MPP 402 payment handling to alloy's HTTP and WS transports.
MppLayer<P>+MppService<S,P>— tower middleware that intercepts 402 responses, pays, and retriesMppReqwestClient<P>— reqwest transport with 402 interceptionMppWsConnect<P>— wrapsWsConnect, handles 402 during WS upgrade