Skip to content
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

Update definition for "restricted" methods #1195

Closed
alexandratran opened this issue Mar 7, 2024 · 3 comments · Fixed by #1217 or MetaMask/api-specs#202
Closed

Update definition for "restricted" methods #1195

alexandratran opened this issue Mar 7, 2024 · 3 comments · Fixed by #1217 or MetaMask/api-specs#202
Assignees
Labels
tech-writing Requires updates to documentation content. wallet Related to wallet content.

Comments

@alexandratran
Copy link
Contributor

alexandratran commented Mar 7, 2024

We currently imply that a "restricted" method is a method that requires being passed directly to wallet_requestPermissions:

Under this definition, only eth_accounts is restricted. We want to modify this definition to include the signature, sending, and encryption methods that are enabled via eth_accounts.

Something along the lines of "restricted methods are methods that cannot be called unless you have permission to do so using wallet_requestPermissions or wallet_requestSnaps." Add a note to this definition stating that acquiring the eth_accounts permission includes/enables calling the restricted signing/sending methods.

Also include in the description of each restricted method how to acquire the permission (either via eth_requestAccounts or wallet_requestSnaps – this is already be done for the restricted Snaps methods).

See MetaMask/api-specs#195 for the full list of restricted methods.

@alexandratran alexandratran added wallet Related to wallet content. tech-writing Requires updates to documentation content. labels Mar 7, 2024
@jiexi
Copy link
Contributor

jiexi commented Mar 8, 2024

It would be great if we could loosen "restricted" enough to use it to describe permissioned snap methods as well

@vandan
Copy link
Contributor

vandan commented Mar 8, 2024

We'll need to specify that Snap methods that are restricted are a little different in that they need to go through wallet_requestSnaps rather than wallet_requestPermission for permissions.

@alexandratran
Copy link
Contributor Author

Updated issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-writing Requires updates to documentation content. wallet Related to wallet content.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants