Skip to content

fix: use P-256 access keys for MPP payments#50

Open
decofe wants to merge 1 commit into
mainfrom
centaur/fix-p256-mpp-payment-20260710163458
Open

fix: use P-256 access keys for MPP payments#50
decofe wants to merge 1 commit into
mainfrom
centaur/fix-p256-mpp-payment-20260710163458

Conversation

@decofe

@decofe decofe commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

  • resolve MPP payments with locally stored access-key identities before the generic provider fallback
  • rehydrate CLI P-256 JWK handles through the accounts WebCrypto keystore
  • add a regression test for the persisted passkey-backed key format

Root cause

resolvePaymentIdentity() never used storedAccessKeyIdentity(), and the reconstruction helper only accepted legacy privateKey records. CLI-created P-256 keys are persisted as handle.jwk plus publicKey, so payment creation fell back to a generic JSON-RPC identity and crashed with Cannot read properties of undefined (reading 'toLowerCase').

Validation

  • pnpm check:format
  • pnpm check:lint
  • pnpm check:types
  • pnpm test — 112 passed
  • live Browserbase reproduction now reaches the expected InsufficientBalance revert instead of the toLowerCase exception

Fixes #49

Prompted by: @alexrisch

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.

tempo-request fails MPP charges with P-256 access keys

2 participants