feat(evm-wallet-experiment): make Pimlico optional for away wallet via peer relay#897
Merged
Merged
Conversation
…a peer relay When the away wallet has no bundler configured, delegation redemptions are relayed to the home wallet via CapTP instead of throwing. The home wallet executes the redemption using its own infrastructure (direct 7702 or bundler). This requires the home wallet to be online but eliminates the Pimlico API key requirement on the away device. Key changes: - Add `handleRedemptionRequest` coordinator method for home-side relay - Branch `submitDelegationUserOp` and `submitBatchDelegationUserOp` to relay via peer when no bundler is configured - Guard against infinite relay loops (home must have bundler or 7702) - Validate empty delegations in relay requests - Update `getCapabilities` autonomy to distinguish relay mode from offline-capable mode - Enable `sendBatchTransaction` delegation path via peer relay - 10 new unit tests (196 total) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sirtimid
force-pushed
the
sirtimid/pimlico-optional-away-wallet
branch
from
March 26, 2026 18:07
74722ae to
00f6f5d
Compare
sirtimid
force-pushed
the
sirtimid/pimlico-optional-away-wallet
branch
from
March 26, 2026 18:11
00f6f5d to
9d6b09a
Compare
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
sirtimid
force-pushed
the
sirtimid/pimlico-optional-away-wallet
branch
from
March 26, 2026 18:52
90ecc46 to
6771ddb
Compare
sirtimid
force-pushed
the
sirtimid/pimlico-optional-away-wallet
branch
from
March 26, 2026 19:57
6771ddb to
bf15c41
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
…D / SDK calldata Move the peer relay check in `submitDelegationUserOp` and `submitBatchDelegationUserOp` before `resolveChainId()` and `buildSdkRedeemCallData()`. The relay path forwards raw delegations and execution to the home wallet and does not need local chain ID or SDK calldata — computing them first blocks the relay when the provider is temporarily unreachable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sirtimid
force-pushed
the
sirtimid/pimlico-optional-away-wallet
branch
from
March 26, 2026 20:21
ffd9a42 to
e017df7
Compare
sirtimid
enabled auto-merge
March 26, 2026 21:22
grypez
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Makes the Pimlico bundler optional for the away wallet. When no bundler is configured, delegation redemptions are relayed to the home wallet via CapTP — the home wallet executes them using its own infrastructure (direct 7702 tx or bundler). This requires the home wallet to be online, but eliminates the Pimlico API key requirement on the away device.
handleRedemptionRequestcoordinator method so the home wallet can execute delegations on behalf of the away walletsubmitDelegationUserOpandsubmitBatchDelegationUserOpto relay viaE(peerWallet).handleRedemptionRequest()when no bundler is configuredhandleRedemptionRequestvalidates the home wallet has bundler or 7702 before processinggetCapabilitiesautonomy label to distinguish relay mode ("relay, requires home online") from offline-capable modesendBatchTransactiondelegation path via peer relaysetup-away.shinfo message to explain relay modeTesting
10 new unit tests (196 total, all passing) cover the relay paths: single and batch delegation relay to peer,
handleRedemptionRequeston the home side (single, batch, error cases),sendTransactionflowing through the relay path, empty delegations validation, relay rejection when home has no bundler/7702, andgetCapabilitiesautonomy reporting for relay mode. Manual e2e: set up home + away without--pimlico-keyon away, verify delegation redemption works via relay.🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Note
Medium Risk
Changes the delegation redemption submission path by introducing a CapTP relay fallback when no bundler/7702 is configured, which could affect how transactions are executed and how failures surface across peers. Scope is limited to coordinator logic plus tests/docs, with explicit loop-prevention and expanded test coverage reducing risk.
Overview
Enables away wallets to redeem delegations without a Pimlico bundler by relaying redemption requests to the connected home wallet over CapTP when
configureBundler()(and directstateless7702) are not available.Adds a new peer API
handleRedemptionRequestand routessubmitDelegationUserOp,submitBatchDelegationUserOp, and delegation-basedsendBatchTransactionthrough the relay path when appropriate, with error propagation and loop-prevention guards;getCapabilities().autonomynow distinguishes offline-capable vs relay, requires home online.Updates setup/docs to describe the new optional-bundler/relay mode, and adds comprehensive unit tests covering single/batch relay flows, capability reporting, and rejection/error cases.
Written by Cursor Bugbot for commit 9a28660. This will update automatically on new commits. Configure here.