[OpenRPC] Clarify wallet_prepareCalls response schema variants#1177
[OpenRPC] Clarify wallet_prepareCalls response schema variants#1177JackReacher0807 wants to merge 1 commit intomainfrom
Conversation
…hen-returned descriptions
🔗 Preview Mode
|
🔍 Link CheckStatus: ⏭️ Skipped (no content changes) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a09cae984
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| description: "Raw payload that can be signed if using a signer that supports signing raw bytes (such as an Alchemy Signer)" | ||
| description: "Prepared EIP-7702 Authorization" | ||
| description: "Array of prepared calls" | ||
| description: "Returned when the request requires multiple signatures — most commonly on the first transaction for an EIP-7702 account that hasn't been delegated yet. The array contains an `authorization` item (EIP-7702 delegation) and a `user-operation-v070` item, each with its own `signatureRequest`. Sign every item in the array and pass the full array to `wallet_sendPreparedCalls`. After the initial delegation, subsequent requests return a single user operation instead." |
There was a problem hiding this comment.
Describe array variant as v060/v070, not only v070
This description says the multi-signature array always contains an authorization item and a user-operation-v070 item, but the schema for this same array explicitly allows user-operation-v060 as an item type (enum: "user-operation-v060" in the array item anyOf). That mismatch can lead integrators to hardcode v070 parsing and mishandle valid v060 responses; please make the guidance variant-agnostic or explicitly mention both versions.
Useful? React with 👍 / 👎.
|
Closing: this spec file is auto-generated from the wallet server repo. Changes need to be made upstream so they persist through generation. |
Summary
Addresses DOCS-31: User feedback says the wallet_prepareCalls response schema is hard to understand because the 4 response variants lack guidance on when each one is returned.
Changes
descriptionon theprepareCallsResponseresult explaining that the response type depends on account type and request configurationanyOfresponse variants to explain when each variant is returned and what the developer should do with it:array: Returned when the request requires multiple signatures (first EIP-7702 transaction before delegation). Sign every item and pass towallet_sendPreparedCalls.user-operation-v060: Returned for smart contract accounts using Entrypoint v0.6.0.user-operation-v070: The most common variant. Returned for delegated EIP-7702 accounts or SCA accounts using Entrypoint v0.7.0 (default).paymaster-permit: Returned when ERC-20 gas payment requires a Permit signature first. Sign the permit, then resubmitmodifiedRequesttowallet_prepareCalls.Verification
pnpm run generate && pnpm run validate:rpcpasses with 0 errors