Skip to content

feat(tempo): support signMessage and signTypedData on configurable accounts - #5332

Merged
jxom merged 1 commit into
mainfrom
claude/tempo-configurable-sign-message
Oct 28, 2026
Merged

jxom merged 1 commit into
mainfrom
claude/tempo-configurable-sign-message

Conversation

@jxom

@jxom jxom commented Oct 28, 2026

Copy link
Copy Markdown
Member

Account.fromConfig accounts (TIP-1107) threw on signMessage / signTypedData, so wallets using them could not answer personal_sign or eth_signTypedData_v4. Both now sign the EIP-191 / EIP-712 digest through the existing sign, returning the same configurable signature envelope (owner approvals up to the threshold via signConfigurable). Verification already works through Tempo's verifyHash (signature verifier precompile verifyConfigurableAccount).

const account = Account.fromConfig({ address: 'infer', owners: [owner] })
const signature = await account.signMessage({ message: 'hello' })
await client.verifyMessage({ address: account.address, message: 'hello', signature }) // true

Behavior worth reviewer attention (documented in TSDoc and account.fromConfig.mdx):

  • Signatures verify against the account's current config: a config update makes earlier signatures return false (covered by a test).
  • Configurable accounts have no code and do not answer ERC-1271 isValidSignature (checked on localnet for derived and upgraded accounts; generic verifyHash with chain: null returns false), so plain ERC-1271 verifiers do not accept them.
  • Local owners below the threshold throw Local owners do not meet the threshold. at signing time; envelopes below quorum or with non-owner approvals verify as false.

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 failing transactionReceipt formatter (getTransactionReceipt) fails identically on main with that image.
  • Biome (pnpm check via pre-commit): no fixes.
  • tsc -b: only errors are from missing contracts/generated.js (Foundry unavailable locally); none in src/tempo.

Generated by Claude Code

@changeset-bot

changeset-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 33678f8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

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

@vercel

vercel Bot commented Oct 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
viem Building Building Preview Oct 28, 2026 2:10am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T02:15:31.009541Z 33678f8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jxom
jxom merged commit de39e10 into main Oct 28, 2026
35 of 40 checks passed
@jxom
jxom deleted the claude/tempo-configurable-sign-message branch October 28, 2026 02:12
@github-actions github-actions Bot mentioned this pull request Oct 28, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread src/tempo/Account.ts
Comment on lines +417 to 419
async signMessage({ message }) {
return await account.sign({ hash: hashMessage(message) })
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

jxom added a commit to tempoxyz/accounts that referenced this pull request Oct 28, 2026
… 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>

This branch was successfully deployed

1 active deployment
Preview — 33678f8f Deployed Oct 28, 2026 by vercel[bot]
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.

2 participants