feat(mpp): advertise Solana MPP session challenges (@atxp/server, Phase 4b)#184
Merged
Conversation
…se 4b)
omniChallenge: fetchMppSupported now returns { tempo, solana } from auth's GET /mpp/supported
(was Tempo-only); buildMppChallenges advertises a solana intent=session challenge alongside
the solana charge when auth exposes a Solana authorizedSigner. methodDetails carries only the
authorizedSigner (accounts opens the channel + uses its own operator/fee-payer). requirePayment
+ buildPaymentOptions thread the new mppSolanaSession through.
Client/metering/settle paths are already chain-agnostic (challenge.method drives accounts).
omniChallenge tests green (39); tsc clean.
Co-Authored-By: Claude Opus 4.8 <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.
Part of the streaming-payments arc — Phase 4b: Solana MPP payment-channel sessions. Companion to accounts #845 and auth #279.
What this adds (
@atxp/server)omniChallenge.ts— addsSolanaMppSessionSupport+ aMppSupported = { tempo, solana }shape.fetchMppSupportednow reads both keys from/mpp/supported.buildMppChallengestakes an optionalmppSolanaSessionparam and, when present, emits asolanachallenge withintent: 'session'(methodDetails carries only theauthorizedSigner— accounts supplies operator/fee-payer + opens the channel).buildPaymentOptionsthreads the new param through.requirePayment.ts— passesmppSession: mppSupported?.tempoandmppSolanaSession: mppSupported?.solanainto the omni-challenge builder.The client/metering/credential layers are already chain-agnostic —
challenge.methoddrives accounts — so no client-side changes were needed.Compatibility
Purely additive. When auth advertises no
solanablock (solana: null), no Solana challenge is emitted and behavior is identical to today. Existing omniChallenge tests pass (39).Verification — full local-stack E2E on Solana mainnet
dev:cli→ resource server (this build) → local auth → local accounts → mainnet:-30402omni-challenge including the Solanamppsession option; SDKauthorized via mppand retried successfully5gMU3uMM…UZbzC/ settle tx47V8aWxU…svCze— both confirmed, err: nullNote:
src/dev/resource.tscarries local-only dev tweaks (not committed).🤖 Generated with Claude Code