feat: scw auth forwarding with manual request to match payload #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pass Request Metadata for Silent Data Signature Verification
Description
Implements payload alignment for Silent Data's EIP-712 signature verification by forwarding the original JSON-RPC request metadata (
idandjsonrpc) through the bundler's call chain. This enables the bundler to reconstruct the exacteth_getLogspayload that clients sign foreth_getUserOperationReceiptandeth_getUserOperationByHashrequests.Changes
1. Added
RpcRequestMetadataTypepackages/types/src/api/interfaces.tsto carryidandjsonrpcthrough the call stack2. Thread Request Metadata Through All Layers
{ id, jsonrpc }at entry point and pass to methodsrequestMetadataIEntryPointServicecontract3. Manual
eth_getLogsPayload Construction (EntryPointV7Service)getLogs()with manual JSON-RPC payload constructiontransport.request()for full control over request structureidandjsonrpcfrom metadata in the payload4. Strict Validation
x-from-blockheader (no silent defaults)Request Flow
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that applyFurther comments (optional)
Why This Matters
For Silent Data's privacy-preserving RPC nodes, clients must sign requests using EIP-712. The signature is computed over the exact JSON-RPC payload, including the
idfield. Previously, the bundler used viem's high-level APIs that auto-generate request IDs, making it impossible for clients to pre-sign requests. This implementation enables payload alignment between what clients sign and what the bundler sends, unlocking support for Silent Data-protected reads in smart contract wallet implementations.