Skip to content

fix: select access key before computing MPP channel authorizedSigner#588

Open
TheRealRajdeep wants to merge 2 commits into
tempoxyz:mainfrom
TheRealRajdeep:fix/mpp-access-key-selection
Open

fix: select access key before computing MPP channel authorizedSigner#588
TheRealRajdeep wants to merge 2 commits into
tempoxyz:mainfrom
TheRealRajdeep:fix/mpp-access-key-selection

Conversation

@TheRealRajdeep

Copy link
Copy Markdown

Summary

  • Fix: The MPP getClient callback in Provider.ts was always using the root account address when constructing
    the client for mppx. This caused the channel authorizedSigner to be computed from the root address, meaning voucher
    signing fell back to the root wallet even when a scoped access key existed.
  • Change: The callback now calls AccessKey.select() before falling back to the root address. When a matching
    access key is found, its address is attached as accessKeyAddress on the client account object — which mppx already
    reads via getAuthorizedSigner in Session.ts.
  • Test: Adds a localnet integration test that authorizes an access key and verifies MPP payments succeed through
    it.

Closes #518

Test plan

  • pnpm tsc -b --noEmit passes (zero type errors)
  • All 24 lib/pure test suites pass (432 tests)
  • New test mpp client uses access key address as authorizedSigner added to src/core/mppx.localnet.test.ts
  • Localnet tests require Docker (pnpm dev) — will run in CI

@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown

@TheRealRajdeep is attempting to deploy a commit to the Tempo Team on Vercel.

A member of the Team first needs to authorize it.

@deodad

deodad commented May 29, 2026

Copy link
Copy Markdown
Contributor

hey, appreciate the PR. This is directionally right but will still hit edge cases:

  • an access key may or may not have the right scopes
  • until T5, only secp256k1 keys are able to sign vouchers

we're considering introducing mpp_authorize to solve these

@TheRealRajdeep

Copy link
Copy Markdown
Author

Ah okay. Is it possible that we work together on it?

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.

MPP sessions compute authorizedSigner before access-key selection

2 participants