feat: add wallet_authorizeChallenge support#540
Merged
Conversation
commit: |
This was referenced Jun 11, 2026
ff5f579 to
aa849a7
Compare
jxom
reviewed
Jun 11, 2026
Member
There was a problem hiding this comment.
maybe wallet.ts a better module name?
jxom
approved these changes
Jun 11, 2026
aa849a7 to
1e06130
Compare
jxom
approved these changes
Jun 12, 2026
1e06130 to
da7f3a4
Compare
parvahuja
pushed a commit
to parvahuja/mppx
that referenced
this pull request
Jun 19, 2026
brendanjryan
pushed a commit
that referenced
this pull request
Jun 20, 2026
* Revert "feat: add wallet_authorizeChallenge support (#540)" * Add wallet_authorizeChallenge removal changeset --------- Co-authored-by: Parv Ahuja <parv@cf36c60m99.tail388b2e.ts.net> Co-authored-by: Parv Ahuja <17094219+parvahuja@users.noreply.github.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.
Summary
wallet_authorizeChallengewallet support: when a Tempo payment method resolves a JSON-RPC account, mppx first asks the wallet to satisfy the Challenge via thewallet_authorizeChallengeRPC and falls back to local signing when unsupported.wallet_getCapabilitiesformpp.status === 'supported'on the challenge chain. The probe is opportunistic — any probe failure keeps the legacy local-signing path; only thewallet_authorizeChallengecall itself falls back strictly on4200/-32601and rethrows other errors.wallet_authorizeChallenge({ challenges: [serialized] })→{ authorization }, validated to answer the exact challenge sent.charge(after client/account resolution and theexpectedRecipientscheck, which now also applies to wallet-handled payments) and v2session(automatic mode only; manual actions, caller-supplied channels, and locally opened channels stay on the local path). Sessions probe once per instance, not per voucher.src/tempo/legacyare untouched; zero new RPCs for non-JSON-RPC accounts.Supersedes #527, rebuilt on the TIP-1034 session architecture — server session snapshots + pluggable storage replace the old
sessioncontinuation parameter, so the RPC is challenges-in, credential-out.Wallet-side counterpart (serves the RPC + advertises the capability): tempoxyz/accounts PR (linked below). Independent of #526 — either can land first; clients fall back gracefully until both sides exist.
Validation
pnpm check:types,pnpm check:ci; 53 tests across the helper (table-driven fallback matrix), charge, and session hooks.