Commit 78dd810
feat: Implement SIP-29 permission and handlers (#3028)
Add an `endowment:assets` permission that lets Snaps expose
`OnAssetsLookup` and `OnAssetsConversion`. These handlers are going to
be called by controllers responsible for managing non-EVM assets. This
PR is mostly adding support for those handlers, as well as the
types/structs required to validate the parameters and responses.
Additionally some work was done to transform the responses to filter out
any out of scope assets returned.
For reference: https://metamask.github.io/SIPs/SIPS/sip-29
---------
Co-authored-by: Maarten Zuidhoorn <[email protected]>1 parent 277b974 commit 78dd810
File tree
32 files changed
+1241
-19
lines changed- packages
- examples/packages
- browserify-plugin
- browserify
- snaps-controllers
- src/snaps
- snaps-execution-environments
- lavamoat/browserify
- iframe
- node-process
- node-thread
- webview
- worker-executor
- worker-pool
- src/common
- snaps-rpc-methods
- src
- endowments
- snaps-sdk/src/types/handlers
- snaps-simulation/src/methods
- snaps-utils
- src
- manifest
32 files changed
+1241
-19
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
0 commit comments