-
-
Notifications
You must be signed in to change notification settings - Fork 266
feat: support 7715 discoverability methods #7603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MoMannn
wants to merge
9
commits into
main
Choose a base branch
from
feat--support-7715-discoverability-methods
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
…pport-7715-discoverability-methods
7 tasks
mj-kiwi
reviewed
Jan 13, 2026
packages/eth-json-rpc-middleware/src/methods/wallet-get-granted-execution-permissions.ts
Show resolved
Hide resolved
packages/eth-json-rpc-middleware/src/methods/wallet-get-granted-execution-permissions.ts
Outdated
Show resolved
Hide resolved
mj-kiwi
previously approved these changes
Jan 13, 2026
mj-kiwi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go
mj-kiwi
approved these changes
Jan 13, 2026
V00D00-child
approved these changes
Jan 13, 2026
Member
V00D00-child
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
Explanation
What is the current state of things and why does it need to change?
The
@metamask/eth-json-rpc-middlewarepackage currently supports two EIP-7715 methods:wallet_requestExecutionPermissions— for requesting new execution permissionswallet_revokeExecutionPermission— for revoking existing execution permissionsHowever, the EIP-7715 specification also defines two additional "discoverability" methods that allow dApps to query the wallet about its execution permission capabilities. Without these methods, dApps have no way to:
What is the solution your changes offer and how does it work?
This PR adds support for the two missing EIP-7715 discoverability methods:
wallet_getSupportedExecutionPermissions— Returns an object keyed by permission type (e.g.,native-token-allowance,erc20-token-allowance) with their supported chain IDs and rule types. This allows dApps to understand what the wallet can handle before making permission requests.wallet_getGrantedExecutionPermissions— Returns an array of all currently active (non-revoked) execution permissions. Each permission includes chain ID, addresses, permission details, context, dependencies, and delegation manager information.The implementation follows the established patterns in this package:
createWallet*Handler)Are there any changes whose purpose might not obvious to those unfamiliar with the domain?
The handlers don't perform parameter validation since these methods don't accept parameters (they're pure query methods). This is intentional and differs from
wallet_requestExecutionPermissionsandwallet_revokeExecutionPermissionwhich validate their params using Superstruct schemas.References
Checklist
Note
Implements EIP-7715 discoverability methods and integrates them into the wallet middleware.
createWalletGetSupportedExecutionPermissionsHandlerandcreateWalletGetGrantedExecutionPermissionsHandlerusing hook-based processing andNoParamsStructvalidationindex.ts(SupportedExecutionPermissionConfig*,GrantedExecutionPermission*, results)EmptyArrayStruct/NoParamsStructinutils/structsfor "no params" validationcreateWalletMiddlewarevia optionalprocessGet*hooksWritten by Cursor Bugbot for commit 8e94f86. This will update automatically on new commits. Configure here.