Repository navigation
feat(tempo): add multisig configuration witnesses - #414
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
There was a problem hiding this comment.
💡 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".
| if ( | ||
| (envelope as { type?: string | undefined }).type === 'multisig' || | ||
| ('signatures' in envelope && ('account' in envelope || 'init' in envelope)) | ||
| ('config' in envelope && 'signatures' in envelope) |
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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 👍 / 👎.
| const config = MultisigConfig.from({ | ||
| ...operation.config, | ||
| version: operation.configVersion, | ||
| }) |
There was a problem hiding this comment.
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 👍 / 👎.
| /** Initial native multisig account, derived from config when omitted. */ | ||
| account?: Address.Address | undefined | ||
| /** Initial version-0 multisig configuration witness. */ | ||
| config: MultisigConfig.Input<0 | 0n> |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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> |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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) => { |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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".
| const config = MultisigConfig.from({ | ||
| ...resolved.config, | ||
| version: resolved.version, | ||
| }) |
There was a problem hiding this comment.
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 👍 / 👎.
| approvals: approvals.map((approval) => { | ||
| if (approval.type === 'primitive') return approval |
There was a problem hiding this comment.
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 👍 / 👎.
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
…`, `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]>
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.