Skip to content

feat(tempo): add multisig configuration witnesses - #414

Merged
jxom merged 6 commits into
mainfrom
jxom/tip-1061-config-witness-v1
Aug 26, 2026
Merged

jxom merged 6 commits into
mainfrom
jxom/tip-1061-config-witness-v1

Conversation

@jxom

@jxom jxom commented Aug 26, 2026

Copy link
Copy Markdown
Member

Adds complete TIP-1061 configuration witnesses across native multisig configs, signatures, operations, transaction simulation requests, and Zod codecs so Ox v1 matches Tempo's current wire format.

Ports #412 to main.

@vercel

vercel Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ox Ready Ready Preview Aug 26, 2026 4:38am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/ox@414

commit: 5d1744f

@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: d06e6d88cc

ℹ️ 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".

Comment on lines 1248 to +1250
if (
(envelope as { type?: string | undefined }).type === 'multisig' ||
('signatures' in envelope && ('account' in envelope || 'init' in envelope))
('config' in envelope && 'signatures' in envelope)

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 Preserve the documented multisig RPC variants

fromRpc now recognizes multisig values only when they contain config, so initialized responses shaped as { account, signatures } and bootstrap responses shaped as { init, signatures } fall through to CoercionError. Those are the repository-documented TIP-1061 wire variants, so existing multisig RPC responses can no longer be decoded; retain both variants or migrate the repository invariant together with verified node compatibility.

AGENTS.md reference: AGENTS.md:L139-L139

Useful? React with 👍 / 👎.

@@ -0,0 +1,13 @@
---
'ox': patch

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 Mark the breaking multisig API rewrite as major

This changeset is marked as a patch even though the commit removes the existing initialConfig/init signature inputs, replaces both multisig RPC variants, changes the serialized wire shape, and removes transaction-request fields. Consumers using those public APIs will fail after an ostensibly compatible patch upgrade; release this as a major change and provide the required before/after migration shape.

AGENTS.md reference: AGENTS.md:L118-L121

Useful? React with 👍 / 👎.

Comment thread src/tempo/MultisigOperation.ts Outdated
Comment on lines +339 to +342
const config = MultisigConfig.from({
...operation.config,
version: operation.configVersion,
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject mismatched operation configuration versions

When an operation or RPC response contains different values in config.version and configVersion, from silently overwrites the complete witness version with configVersion instead of rejecting the inconsistent record. The returned operation can therefore combine owners and threshold from one configuration with another version, and downstream hashing and serialization treat that fabricated combination as authoritative; validate that both version fields agree before normalizing.

Useful? React with 👍 / 👎.

Comment on lines +1105 to +1108
/** Initial native multisig account, derived from config when omitted. */
account?: Address.Address | undefined
/** Initial version-0 multisig configuration witness. */
config: MultisigConfig.Input<0 | 0n>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the hand-written multisig guide for the new API

The new input requires config, but site/src/pages/tempo/guides/transaction-envelopes/multisig-transactions.mdx still documents the removed bootstrap model and its executable examples pass initialConfig to getSignPayload/sortMultisigApprovals and initialConfig plus init: true to SignatureEnvelope.from (lines 77-79 and 113-137). Users following the current guide receive invalid code, so migrate the guide and all of its later bootstrap examples alongside this API change.

AGENTS.md reference: AGENTS.md:L63-L67

Useful? React with 👍 / 👎.

@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: 75b044f497

ℹ️ 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".

/** Initial native multisig account, derived from config when omitted. */
account?: Address.Address | undefined
/** Initial version-0 multisig configuration witness. */
config: MultisigConfig.Input<0 | 0n>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the v0 migration multisig examples

The new required config field leaves the hand-written site/src/pages/migrating-from-v0.md guide broken: lines 142-146 still pass the removed top-level version option to MultisigConfig.getSignPayload, line 153 constructs an envelope with only { account, signatures }, and line 156 documents the obsolete two-field wire format. Readers following this migration path will get type errors or construct the wrong wire shape, so update this page alongside the API change.

AGENTS.md reference: AGENTS.md:L63-L67

Useful? React with 👍 / 👎.

@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: 44aa66367a

ℹ️ 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".

const { account, approvals, config } = witness
return {
account,
approvals: approvals.map((approval) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Enforce approval limits in core witness conversion

When consumers use the core MultisigWitness.toRpc path directly— including through TransactionRequest.toRpc—a witness with more than MultisigConfig.maxSignatures root or nested approvals is serialized without validation, even though the corresponding Zod schemas enforce the eight-approval protocol limit. Since the public array types do not encode that limit, otherwise type-correct inputs can produce requests the node rejects; validate both approval arrays in the core fromRpc/toRpc conversions as well.

Useful? React with 👍 / 👎.

@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: 5a4110bc0c

ℹ️ 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".

Comment thread src/tempo/MultisigOperation.ts Outdated
Comment on lines +531 to +534
const config = MultisigConfig.from({
...resolved.config,
version: resolved.version,
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject mismatched nested resolver versions

When resolveConfig returns a complete config whose config.version differs from the sibling version, these lines silently overwrite the witness version and reconstruct a child signature combining the owners, salt, and threshold from one configuration with another version. The root operation path now rejects this inconsistency, but the nested resolver path still produces a fabricated commitment that the node will reject; either use the complete config's version or verify both fields agree.

AGENTS.md reference: AGENTS.md:L139-L139

Useful? React with 👍 / 👎.

Comment thread src/tempo/MultisigWitness.ts Outdated
Comment on lines +124 to +125
approvals: approvals.map((approval) => {
if (approval.type === 'primitive') return approval

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize key data in multisig witnesses

When a root or nested approval supplies keyData longer than four bytes—for example, full WebAuthn data—this conversion passes it through unchanged. The existing TransactionRequest.toRpc normalization in src/tempo/TransactionRequest.ts lines 427-435 documents that the node accepts only 1-, 2-, or 4-byte key data as a size hint and otherwise silently uses its default, so witness-based gas estimation will not model the supplied signature size; apply the same two-byte length conversion to approval key data.

Useful? React with 👍 / 👎.

@jxom
jxom merged commit 1cc94e5 into main Aug 26, 2026
14 checks passed
@jxom
jxom deleted the jxom/tip-1061-config-witness-v1 branch August 26, 2026 04:46
@github-actions github-actions Bot mentioned this pull request Aug 24, 2026
jxom pushed a commit that referenced this pull request Oct 25, 2026
Ports the `Variable` case of `getLinkForApiItem` from `main` (#414). Without
it, the `{@link ox#AccountConfig.maxSignatures}` reference added in #509
fails `docs:gen` and every `0.x` docs deployment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b
jxom added a commit that referenced this pull request Oct 25, 2026
…`, `Hex`, and `RpcTransport` (#527)

* fix: keep empty `version` in `TypedData.extractEip712DomainTypes`

Ports wevm/viem#5240.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* feat: add `even` option to `Hex.assert` and `Hex.validate`

Ports wevm/viem#5283.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* fix: array overload resolution in `AbiItem.fromAbi`

Ports wevm/viem#5281.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* fix: `AbiEvent.assertArgs` `string` and `bytes` matching

Ports wevm/viem#5238 and wevm/viem#5280.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* fix: apply `RpcTransport.fromHttp` timeout to the response body and with a caller signal

Ports wevm/viem#5200.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* fix: keep first parameter after `( ` in normalizeSignature (#516)

(cherry picked from commit 36dce4a)

* test: format `Hex` and `RpcTransport` tests

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* fix: read tuple object args by name and match empty arrays in `AbiItem.fromAbi` overloads

Syncs with the merged wevm/viem#5281: tuple object args are read by component
name, and an empty array is ambiguous for `address[]` vs `string[]`/`bytes[]`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* fix: use a line comment for `getComponentValue` to satisfy `check:tsdoc`

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* fix(docgen): link to variables in API docs

Ports the `Variable` case of `getLinkForApiItem` from `main` (#414). Without
it, the `{@link ox#AccountConfig.maxSignatures}` reference added in #509
fails `docs:gen` and every `0.x` docs deployment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* fix: keep the caller signal when `AbortSignal.any` is missing in `RpcTransport.fromHttp`

`AbortSignal.any` is missing on Node < 18.17 and older browsers, which the
0.x line supports. There, the transport now uses the caller signal alone,
as it did before, instead of throwing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

* test: restore `AbortSignal.any` by property descriptor

Matches the main-branch test in #526.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133zgX2g8oLCoH4KuY8tM9b

---------

Co-authored-by: Claude <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 5d1744f7 Deployed Aug 26, 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.

1 participant