Skip to content

fix(tempo): support raw session voucher signing#478

Closed
deodad wants to merge 4 commits into
mainfrom
dad/tempo-charge-chain-source-checks
Closed

fix(tempo): support raw session voucher signing#478
deodad wants to merge 4 commits into
mainfrom
dad/tempo-charge-chain-source-checks

Conversation

@deodad
Copy link
Copy Markdown
Contributor

@deodad deodad commented May 26, 2026

Summary

Fixes Tempo session voucher signing for access-key accounts and tightens Tempo charge source chain handling.

Motivation

Access-key session vouchers need to sign the voucher digest as the access-key address. viem 2.51.0 added sign({ hash, raw: true }), which lets mppx produce escrow-compatible raw signatures without requiring callers to pass a separate direct signer.

Changes

  • Replaced Tempo session authorizedSigner options with voucherSigner accounts in src/tempo/client/Session.ts and src/tempo/client/SessionManager.ts.
  • Updated voucher signing in src/tempo/session/Voucher.ts to sign typed-data digests with raw: true, normalize envelopes, and keep TIP-1020 verification guarded off.
  • Centralized access-key signer-address resolution in src/tempo/internal/account.ts.
  • Fixed src/tempo/client/Charge.ts to require a chain ID from the challenge or client and use canonical proof sources.
  • Bumped viem to 2.51.0 and ox to 0.14.24.

Testing

  • ./node_modules/.bin/vp test src/tempo/session/Voucher.test.ts src/tempo/client/ChannelOps.test.ts src/tempo/client/Session.test.ts
  • pnpm check:types
  • pnpm check
  • git diff --check

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 26, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​typescript/​native-preview@​7.0.0-dev.20260525.110010082100100
Updatedviem@​2.50.4 ⏵ 2.51.085 -13100100 +197100
Updatedox@​0.14.22 ⏵ 0.14.24100 +310099 +197 +1100

View full report

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 26, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
HTTP dependency: npm viem depends on https://pkg.pr.new/ox@386a3439fe1ce76d237930f8c6e6bb493746069a

Dependency: ox@https://pkg.pr.new/ox@386a3439fe1ce76d237930f8c6e6bb493746069a

Location: Package overview

From: examples/charge-wagmi/package.jsonnpm/[email protected]

ℹ Read more on: This package | This alert | What are http dependencies?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Publish the HTTP URL dependency to a public or private package repository and consume it from there.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 26, 2026

Open in StackBlitz

npm i https://pkg.pr.new/mppx@478

commit: 14f5bca

@deodad deodad closed this May 26, 2026
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