Commit cc47984
feat: Implement SIP-31 (#3394)
Introduces the `onClientRequest` handler as specified in SIP-31. This
handler can only be called by MetaMask and is available to all Snaps
without permission. It can be used for general purpose communication
that must not be exposed to dapps (as `onRpcRequest`).
This handler is enforced to only be callable by the `metamask` origin,
as part of this PR this same validation is applied to all handlers in
`CLIENT_ONLY_HANDLERS`.
Closes #3392
---------
Co-authored-by: Maarten Zuidhoorn <[email protected]>1 parent 77b33ab commit cc47984
File tree
14 files changed
+228
-50
lines changed- packages
- snaps-controllers
- src/snaps
- snaps-execution-environments
- src/common
- snaps-rpc-methods/src/endowments
- snaps-sdk/src/types/handlers
- snaps-utils
- src/handlers
14 files changed
+228
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
0 commit comments