Skip to content

Commit 78dd810

Browse files
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

32 files changed

+1241
-19
lines changed

packages/examples/packages/browserify-plugin/snap.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/MetaMask/snaps.git"
88
},
99
"source": {
10-
"shasum": "B0senywfM+w5lQ+iMvK+bVcKJ6VeLDj7HiUVYR5Cuag=",
10+
"shasum": "PU8/QaQOlO6/ShRIM+jofaiQFUAprfuUX9RV6G5xRJo=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/examples/packages/browserify/snap.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/MetaMask/snaps.git"
88
},
99
"source": {
10-
"shasum": "PS0U7SHYXWpFhO8QMtArHKU1rFzMkwtTLFlc3/g1HQ4=",
10+
"shasum": "5vUCvHpbE8BnQv9R8QorYcvyKPZk0s+Fuh/MFUZ7LH4=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"branches": 92.96,
3-
"functions": 96.56,
4-
"lines": 98.05,
5-
"statements": 97.77
2+
"branches": 93.06,
3+
"functions": 96.59,
4+
"lines": 98.08,
5+
"statements": 97.8
66
}

0 commit comments

Comments
 (0)