Repository navigation
feat(tempo): support signMessage and signTypedData on configurable accounts - #5332
Conversation
…counts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D3nmWgXcXqVzkP1bMqFVCN
🦋 Changeset detectedLatest commit: 33678f8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33678f8f86
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| Verify message and typed data signatures with [`verifyMessage`](/docs/actions/public/verifyMessage) | ||
| or [`verifyTypedData`](/docs/actions/public/verifyTypedData) on a Tempo client. Tempo's | ||
| `verifyHash` checks them with the signature verifier precompile. |
There was a problem hiding this comment.
Link the first
verifyHash reference
This is the first prose reference to the core verifyHash action on this page, but unlike the adjacent actions it is rendered as plain inline code, so readers cannot navigate to its API documentation. Link it to /docs/actions/public/verifyHash as required for first API mentions.
AGENTS.md reference: AGENTS.md:L281-L284
Useful? React with 👍 / 👎.
| const signature = await account.signMessage({ message: 'hello' }) | ||
| const typedSignature = await account.signTypedData(typedData) | ||
|
|
||
| expect(SignatureEnvelope.deserialize(signature).type).toBe('configurable') |
There was a problem hiding this comment.
Snapshot the new stable verification results
The added tests repeatedly use direct .toBe(...) assertions for deterministic envelope types and verification booleans. Convert these new stable expectations to toMatchInlineSnapshot() so their expected values follow the repository's required snapshot convention and remain visible in review output.
AGENTS.md reference: AGENTS.md:L201-L201
Useful? React with 👍 / 👎.
| async signMessage({ message }) { | ||
| return await account.sign({ hash: hashMessage(message) }) | ||
| }, |
There was a problem hiding this comment.
Add colocated unit and type tests
This public behavior change is covered only by the gated e2e.accounts.test.ts integration suite; no cases were added to Account.test.ts or Account.test-d.ts. Add colocated unit coverage for the configurable digest/envelope behavior and type coverage for both newly supported methods, as required for public behavior changes.
AGENTS.md reference: AGENTS.md:L219-L219
Useful? React with 👍 / 👎.
… signing (#928) Pins the catalog `viem` and its override to the `viem@main` build `0.0.0-de39e106022f313a16c3b7367d8330753748c516`. That build carries wevm/viem#5332, where `Account.fromConfig` signs messages and typed data instead of throwing. The Tempo Wallet links this repo as `ref/sdk` and needs the same Viem, or its chain and account types stop matching the SDK's. The build also carries viem's unreleased TIP-1106 change: a fill formats Tempo nonces as bigints. `feeLiquidity.localnet.test.ts` passed that nonce to `sendTransactionSync`, which still types `nonce` as a number, so the test now converts it. The nonce there is a sequence nonce, so `Number` loses nothing. The published peer range (`viem >=2.57.12`) is unchanged, so no changeset. Validation: `tsc -b --noEmit`, `vp lint` and `vp fmt --check src` are clean. The localnet suites need Docker, so CI is the reference for them. --- _Generated by [Claude Code](https://claude.ai/code/session_01D3nmWfbMUuWc5wUmems6eQ)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
Account.fromConfigaccounts (TIP-1107) threw onsignMessage/signTypedData, so wallets using them could not answerpersonal_signoreth_signTypedData_v4. Both now sign the EIP-191 / EIP-712 digest through the existingsign, returning the same configurable signature envelope (owner approvals up to the threshold viasignConfigurable). Verification already works through Tempo'sverifyHash(signature verifier precompileverifyConfigurableAccount).Behavior worth reviewer attention (documented in TSDoc and
account.fromConfig.mdx):false(covered by a test).isValidSignature(checked on localnet for derived and upgraded accounts; genericverifyHashwithchain: nullreturnsfalse), so plain ERC-1271 verifiers do not accept them.Local owners do not meet the threshold.at signing time; envelopes below quorum or with non-owner approvals verify asfalse.Validation
pnpm test --project tempo-accounts --run src/tempo/e2e.accounts.test.ts(VITE_TEMPO_TAG=sha-179347b): 63/63 pass, including 4 new tests (derived v0, upgraded root, two owners after a config update incl. stale pre-update signatures, below-threshold / non-owner).pnpm test --project tempo --run src/tempo/Account.test.ts src/tempo/chainConfig.test.ts: 100/101; the failingtransactionReceipt formatter (getTransactionReceipt)fails identically onmainwith that image.pnpm checkvia pre-commit): no fixes.tsc -b: only errors are from missingcontracts/generated.js(Foundry unavailable locally); none insrc/tempo.Generated by Claude Code