-
-
Notifications
You must be signed in to change notification settings - Fork 15
Support calling wallet_requestExecutionPermissions directly on the wallet api #60
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
Merged
+546
−1,012
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
66cc787
to
ee005ce
Compare
ee005ce
to
a197a06
Compare
This was referenced Aug 19, 2025
jeffsmale90
added a commit
to MetaMask/eth-json-rpc-middleware
that referenced
this pull request
Sep 3, 2025
Adds methods `wallet_requestExecutionPermissions` and `wallet_revokeExecutionPermission`, as defined in this revision of the EIP-7715 specification ethereum/ERCs#1098. This supports Readable Permissions project, and is related to the following PRs: - MetaMask/delegation-toolkit#60 - MetaMask/metamask-extension#35193 Note: workflows are failing due to existing problems, fixed by #397
github-merge-queue bot
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Sep 9, 2025
Adds the method `wallet_requestExecutionPermissions` which is defined in this proposed revision of the EIP-7715 specification ethereum/ERCs#1098. ## **Description** This method is proxied to `@metamask/permissions-kernel-snap`, which implements the exact same method. This snap will be preinstalled in Extension, before the feature is enabled for any users. The feature is gated by `process.env.EIP_7715_READABLE_PERMISSIONS_ENABLED` and requires `process.env.PERMISSIONS_KERNEL_SNAP_ID` to be set. Presently `EIP_7715_READABLE_PERMISSIONS_ENABLED` is set to false, and `PERMISSIONS_KERNEL_SNAP_ID` is set to an empty string for all builds. Requires MetaMask/eth-json-rpc-middleware#396 released in https://github.com/MetaMask/eth-json-rpc-middleware/releases/tag/v17.1.0. This change also adds support for `wallet_revokePermission`, which will be implemented in a future PR, once the revocation UI is implemented. [](https://codespaces.new/MetaMask/metamask-extension/pull/35193?quickstart=1) ## **Changelog** CHANGELOG entry: As this is behind a local feature gate, there are no public facing changes. ## **Manual testing steps** Can be tested with MetaMask/delegation-toolkit#60 which adds support to the delegation-toolkit's experimental api to call the wallet method directly, rather than via `wallet_invokeSnap`. ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
32e8f21
to
66e2a31
Compare
66e2a31
to
a779abd
Compare
…stExecutionPermissions on the walletApi
a779abd
to
53aa57e
Compare
hanzel98
approved these changes
Sep 11, 2025
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.
📝 Description
It is now possible to configure MetaMask extension to forward calls towallet_requestExecutionPermissions
calls to the wallet API to the permissions kernel snap. This change adds support for this, while continuing to maintain support for calling the snap directly.The experimental EIP-7715 functionality in the Delegation Toolkit now calls
wallet_requestExecutionPermissions
on the wallet API directly. There is no longer support for calling the snap directly.🔄 What Changed?
When configuring theerc7715ProviderActions
, a caller may provide anErc7715ProviderConfig
that conforms to the following definition:type Erc7715ProviderConfig = {useWalletMethod: boolean;
snapIds:? {
kernelSnapId?: string;
providerSnapId?: string;
}
};
IfuseWalletMethod
is true, any snap configuration is ignored, and the request is made directly towallet_requestExecutionPermissions
on the wallet's injected provider.IfuseWalletMethod
is false, the request is made to the kernel snap.If no snap ids are specified, the default valuesnpm:@metamask/permissions-kernel-snap
andnpm:@metamask/gator-permissions-snap
are used.Support for calling the snaps directly will likely be removed at some stage in the future.When configuring the
erc7715ProviderActions
a caller no longer must provide snapId configuration:This will route all requests to the experimental EIP-7715 methods to the
wallet_requestExecutionPermissions
on the injected ethereum API.🧪 How to Test?
Install in the Snap-7715 site, and configure the Eip7715 client with
no configuration. Ensure that Flask is installed with MetaMask/metamask-extension#35193 installed. The site should function as normal.{ useWalletMethod: true }
List any breaking changes:
Changes the configuration parameters of Erc7715 actions constructor, to nest the snapIds into a child property.No configuration parameters are required when configuring the Erc7715 actions.
📋 Checklist
Check off completed items:
🔗 Related Issues
Link to related issues:
Closes #
Related to #
📚 Additional Notes
Any additional information, concerns, or context: