Skip to content

feat(mpp): advertise Solana MPP session challenges (@atxp/server, Phase 4b)#184

Merged
badjer merged 1 commit into
mainfrom
feat/mpp-solana-sessions
Jun 30, 2026
Merged

feat(mpp): advertise Solana MPP session challenges (@atxp/server, Phase 4b)#184
badjer merged 1 commit into
mainfrom
feat/mpp-solana-sessions

Conversation

@badjer

@badjer badjer commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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 — adds SolanaMppSessionSupport + a MppSupported = { tempo, solana } shape. fetchMppSupported now reads both keys from /mpp/supported. buildMppChallenges takes an optional mppSolanaSession param and, when present, emits a solana challenge with intent: 'session' (methodDetails carries only the authorizedSigner — accounts supplies operator/fee-payer + opens the channel). buildPaymentOptions threads the new param through.
  • requirePayment.ts — passes mppSession: mppSupported?.tempo and mppSolanaSession: mppSupported?.solana into the omni-challenge builder.

The client/metering/credential layers are already chain-agnostic — challenge.method drives accounts — so no client-side changes were needed.

Compatibility

Purely additive. When auth advertises no solana block (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:

  • resource emitted the -30402 omni-challenge including the Solana mpp session option; SDK authorized via mpp and retried successfully
  • open tx 5gMU3uMM…UZbzC / settle tx 47V8aWxU…svCze — both confirmed, err: null

Note: src/dev/resource.ts carries local-only dev tweaks (not committed).

🤖 Generated with Claude Code

…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>
@badjer badjer merged commit 1f83d65 into main Jun 30, 2026
1 check passed
@badjer badjer deleted the feat/mpp-solana-sessions branch June 30, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant