Closed
Conversation
badjer
added a commit
that referenced
this pull request
Apr 9, 2026
…nt ordering - Fix OAuth bypass to only skip challenge for ATXP/X402 (separate headers) or MPP when opaque identity verification succeeds; MPP with failed/missing opaque still gets OAuth challenge (#13) - Extract parseCredentialBase64 helper for try-base64-then-raw-JSON pattern, use in atxpExpress.ts and protocol.ts (#14) - Add opaqueIdentity unit tests: round-trip, tampered sig, wrong challengeId, missing opaque, malformed fields, different sub (#11) - Align MppChallengeData.opaque type to Record<string, unknown> (#16) - Reorder getSources after getExistingPaymentId check in requirePayment to avoid unnecessary fetch on idempotent path; extract fetchAllSources (#6) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
badjer
added a commit
that referenced
this pull request
Apr 9, 2026
* feat: multi-chain MPP support (Solana + Tempo) Server now emits an array of MPP challenges (one per supported chain) instead of a single Tempo-only challenge. Client extracts all challenges and forwards the array to accounts, which picks the chain via feature flag. Uses X-MPP-Payment header to carry the MPP credential alongside the OAuth Bearer token without conflicts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: extract buildPaymentOptions + buildAuthorizeParamsFromSources Shared core for building protocol-specific payment data from destination sources. Used by both requirePayment() (MCP servers) and LLM callers. - buildPaymentOptions: sources → X402 requirements + MPP challenges - buildAuthorizeParamsFromSources: thin wrapper returning AuthorizeParams fields - requirePayment refactored to use buildPaymentOptions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove unused imports buildX402Requirements and sourcesToOptions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: opaque identity for MPP Authorization: Payment ↔ OAuth coexistence Standard MPP uses Authorization: Payment which conflicts with OAuth's Authorization: Bearer. Instead of a custom header (X-MPP-Payment): - Server signs user identity into MPP challenge opaque field (HMAC) - Client sends standard Authorization: Payment (interop preserved) - OAuth fetch skips Bearer when Payment is present - Server recovers identity from opaque on retry (HMAC verified) This preserves interop with external MPP clients/servers while solving the OAuth header conflict for ATXP-to-ATXP flows. Also: challenge ID uniqueness (random suffix), detectProtocol cleanup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: OAuth bypass, credential parsing, opaque tests, and requirePayment ordering - Fix OAuth bypass to only skip challenge for ATXP/X402 (separate headers) or MPP when opaque identity verification succeeds; MPP with failed/missing opaque still gets OAuth challenge (#13) - Extract parseCredentialBase64 helper for try-base64-then-raw-JSON pattern, use in atxpExpress.ts and protocol.ts (#14) - Add opaqueIdentity unit tests: round-trip, tampered sig, wrong challengeId, missing opaque, malformed fields, different sub (#11) - Align MppChallengeData.opaque type to Record<string, unknown> (#16) - Reorder getSources after getExistingPaymentId check in requirePayment to avoid unnecessary fetch on idempotent path; extract fetchAllSources (#6) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: correct onPayment reporting, HMAC env key, inline doc, and new tests - mppProtocolHandler: stop reporting challenge ID as transactionHash; use AuthorizeResult.context if available, empty string otherwise. Use context.network for settled chain when available. - opaqueIdentity: derive HMAC key from ATXP_OPAQUE_KEY env var with random fallback for multi-instance deployments. - oAuth: add inline comment referencing buildPaymentHeaders contract. - omniChallenge.test: add tests for buildPaymentOptions and buildAuthorizeParamsFromSources covering multi-chain scenarios. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: default Tempo MPP currency fallback to USDC Changed buildMppChallenges fallback from 'pathUSD' to 'USDC' since Tempo mainnet now uses USDC as the default stablecoin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
No description provided.