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

Document Snap wallet_* methods #181

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

alexandratran
Copy link
Contributor

@alexandratran alexandratran commented Jan 22, 2024

Document Snap JSON-RPC API methods that are callable by dapps:

  • wallet_getSnap
  • wallet_requestSnaps
  • wallet_snap
  • wallet_invokeSnap

Also add example to wallet_requestPermissions for requesting the wallet_snap permission.

Quick preview: Paste contents of this file snaps-openrpc.json into https://playground.open-rpc.org/.

Fixes MetaMask/metamask-docs#1091

@alexandratran alexandratran requested a review from a team as a code owner January 22, 2024 03:35
@alexandratran alexandratran requested a review from a team January 22, 2024 03:46
@BelfordZ
Copy link
Contributor

great work @alexandratran ! After a first pass, it looks good to me. One thing that would be a great improvement is adding title to each new schema created. This way, when we generate types, we can use the same names. It also somewhat improves the generated output for docs.

@alexandratran
Copy link
Contributor Author

@BelfordZ Thanks! Added in the titles.

@alexandratran alexandratran merged commit 7e29cb8 into MetaMask:main Jan 25, 2024
5 checks passed
@alexandratran alexandratran deleted the 1091-snap-wallet-methods branch January 25, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document Snaps wallet_* methods in wallet API
4 participants