Skip to content

Commit 03cd5d6

Browse files
authored
Add property and hook for specifying custom cryptography functions (#2909)
`key-tree` now allows specifying custom functions to use for cryptography. To support this in Snaps, I've added a new hook `getClientCryptography` to the `SnapController` and entropy-related JSON-RPC methods. This hook should return an object containing the functions to use (or just an empty object to use the defaults).
1 parent cbe55de commit 03cd5d6

33 files changed

+442
-66
lines changed

packages/examples/packages/bip32/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"test:watch": "jest --watch"
4444
},
4545
"dependencies": {
46-
"@metamask/key-tree": "^9.1.2",
46+
"@metamask/key-tree": "^10.0.1",
4747
"@metamask/snaps-sdk": "workspace:^",
4848
"@metamask/utils": "^10.0.0",
4949
"@noble/ed25519": "^1.6.0",

packages/examples/packages/bip32/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": "ZgNEuQpFXjusvZX+0dsqN/jWaTFnk1T9mePMO2OxoQs=",
10+
"shasum": "hRuh420QB8uksiS3rFwrvqNoQD5XTH/QyWkhFkmNBD8=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/examples/packages/bip44/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"test:watch": "jest --watch"
4444
},
4545
"dependencies": {
46-
"@metamask/key-tree": "^9.1.2",
46+
"@metamask/key-tree": "^10.0.1",
4747
"@metamask/snaps-sdk": "workspace:^",
4848
"@metamask/utils": "^10.0.0",
4949
"@noble/bls12-381": "^1.2.0"

packages/examples/packages/bip44/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": "dxKtnBcjmsoplDWa7k/dGTEVKyxl3slprHFoosSOPVI=",
10+
"shasum": "kztNgPuBct9iJIGhWZs2i/yluGPJSQi0xl5+00opVGs=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

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": "ecGX3duI1nyJ8BOjkIPLze204JXMQKL8Eq1ir8Mm/dg=",
10+
"shasum": "4yLB19XYAdGgHBPFlVOzCkb/JUZCjSajPRSQWs+a3uE=",
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": "KSkMBlnuET6wdxlrTCFlg6h1GDiCK8ShQoTbKPse0Ek=",
10+
"shasum": "+0hxp1uhfCqe9KR+4RPDSPGHFTgRyGULKLn9XWwCmsY=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/examples/packages/invoke-snap/packages/consumer-signer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"test:watch": "jest --watch"
4444
},
4545
"dependencies": {
46-
"@metamask/key-tree": "^9.1.2",
46+
"@metamask/key-tree": "^10.0.1",
4747
"@metamask/snaps-sdk": "workspace:^",
4848
"@metamask/utils": "^10.0.0",
4949
"@noble/hashes": "^1.3.1"

packages/examples/packages/invoke-snap/packages/core-signer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"test:watch": "jest --watch"
4444
},
4545
"dependencies": {
46-
"@metamask/key-tree": "^9.1.2",
46+
"@metamask/key-tree": "^10.0.1",
4747
"@metamask/snaps-sdk": "workspace:^",
4848
"@metamask/utils": "^10.0.0",
4949
"@noble/curves": "^1.1.0",

packages/examples/packages/invoke-snap/packages/core-signer/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": "edIB0mUiM5lDzUI7tbS+VWnBxyB/ujEYRoQ/luywavA=",
10+
"shasum": "g0lygIry0x1ULrACMgFTncUXfstO2l+7iM7/D65BXqY=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/snaps-controllers/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"@metamask/base-controller": "^7.0.2",
8484
"@metamask/json-rpc-engine": "^10.0.1",
8585
"@metamask/json-rpc-middleware-stream": "^8.0.5",
86+
"@metamask/key-tree": "^10.0.1",
8687
"@metamask/object-multiplex": "^2.0.0",
8788
"@metamask/permission-controller": "^11.0.3",
8889
"@metamask/phishing-controller": "^12.0.2",

0 commit comments

Comments
 (0)