diff --git a/packages/snap/package.json b/packages/snap/package.json index 41d0cb1..da0c59a 100644 --- a/packages/snap/package.json +++ b/packages/snap/package.json @@ -39,7 +39,7 @@ "@metamask/eslint-config-nodejs": "^12.1.0", "@metamask/eslint-config-typescript": "^12.1.0", "@metamask/snaps-cli": "^6.2.0", - "@metamask/snaps-jest": "^7.0.0", + "@metamask/snaps-jest": "^8.2.0", "@typescript-eslint/eslint-plugin": "^5.42.1", "@typescript-eslint/parser": "^5.42.1", "eslint": "^8.45.0", diff --git a/yarn.lock b/yarn.lock index 9e5086c..814639f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2588,15 +2588,15 @@ __metadata: languageName: node linkType: hard -"@metamask/approval-controller@npm:^6.0.1": - version: 6.0.1 - resolution: "@metamask/approval-controller@npm:6.0.1" +"@metamask/approval-controller@npm:^7.0.0": + version: 7.0.0 + resolution: "@metamask/approval-controller@npm:7.0.0" dependencies: - "@metamask/base-controller": ^5.0.1 + "@metamask/base-controller": ^6.0.0 "@metamask/rpc-errors": ^6.2.1 "@metamask/utils": ^8.3.0 nanoid: ^3.1.31 - checksum: 743a06a11fe10f413631696a5ef74f225092ca5c1bef979b656215eccaffb5ad6eb31fc738d948e4668a62788175de246e692674886c397aa15587dc6667889c + checksum: fa9c08959dbd89563fe8f07d0086703854d1f645ac00fe58eae62cc8a4eb344de7c26744baa9f2c2ad7a10999dd522bcb822692f76f76f1c84189550c6c80cdf languageName: node linkType: hard @@ -2729,31 +2729,44 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-json-rpc-middleware@npm:^12.1.0": - version: 12.1.0 - resolution: "@metamask/eth-json-rpc-middleware@npm:12.1.0" +"@metamask/eth-block-tracker@npm:^9.0.3": + version: 9.0.3 + resolution: "@metamask/eth-block-tracker@npm:9.0.3" dependencies: - "@metamask/eth-json-rpc-provider": ^2.1.0 + "@metamask/eth-json-rpc-provider": ^3.0.2 + "@metamask/safe-event-emitter": ^3.0.0 + "@metamask/utils": ^8.1.0 + json-rpc-random-id: ^1.0.1 + pify: ^5.0.0 + checksum: edd3d59a0416752d90c8e2d8c10c31635dbe3eb323fcb054c401528afe4cbbb6a5a85aedd6ffee4a504d9779656bfab027f2274fd95981c90bf56b6f565dbca2 + languageName: node + linkType: hard + +"@metamask/eth-json-rpc-middleware@npm:^12.1.2": + version: 12.1.2 + resolution: "@metamask/eth-json-rpc-middleware@npm:12.1.2" + dependencies: + "@metamask/eth-block-tracker": ^9.0.3 + "@metamask/eth-json-rpc-provider": ^3.0.2 "@metamask/eth-sig-util": ^7.0.0 - "@metamask/json-rpc-engine": ^7.1.1 + "@metamask/json-rpc-engine": ^8.0.2 "@metamask/rpc-errors": ^6.0.0 "@metamask/utils": ^8.1.0 - eth-block-tracker: ^8.0.0 klona: ^2.0.6 pify: ^5.0.0 safe-stable-stringify: ^2.4.3 - checksum: de4f0afb80575d853901812406e9c58bafd3a1679164b2b9fa60dcfc8841c7e625661b9f1ebe5ef4d0d15b66736a7a5495388de879739689af9a9539daf1fdfa + checksum: 0334fa8e51d73488e42e1cd663e90012f4055c5cd04cb4ff371ecb3552b82cd271f27a88ff0187ad23f195cfbbba467126711c08b20c1124083a706a85524a82 languageName: node linkType: hard -"@metamask/eth-json-rpc-provider@npm:^2.1.0": - version: 2.3.2 - resolution: "@metamask/eth-json-rpc-provider@npm:2.3.2" +"@metamask/eth-json-rpc-provider@npm:^3.0.2": + version: 3.0.2 + resolution: "@metamask/eth-json-rpc-provider@npm:3.0.2" dependencies: - "@metamask/json-rpc-engine": ^7.3.2 + "@metamask/json-rpc-engine": ^8.0.2 "@metamask/safe-event-emitter": ^3.0.0 "@metamask/utils": ^8.3.0 - checksum: e6731271aad3b972d85b9230c26d35a9b88722f3bd3024675ad2f568e634e9fdfef4717ef2892f3cc512d381cf17a4e20dbd5eb808ced765082bea3379ad6ddc + checksum: 0321eaad6fa205a9d3ddcfaf28e63c05291614893cb2e116151185a4acbd6bb6a508d6e556b3cb8bc4d3caef4bf0a638202d9b6bdc127fbcb81715eb2660a809 languageName: node linkType: hard @@ -2793,7 +2806,7 @@ __metadata: languageName: node linkType: hard -"@metamask/json-rpc-engine@npm:^7.1.1, @metamask/json-rpc-engine@npm:^7.3.2": +"@metamask/json-rpc-engine@npm:^7.3.2": version: 7.3.3 resolution: "@metamask/json-rpc-engine@npm:7.3.3" dependencies: @@ -2815,6 +2828,17 @@ __metadata: languageName: node linkType: hard +"@metamask/json-rpc-engine@npm:^8.0.2": + version: 8.0.2 + resolution: "@metamask/json-rpc-engine@npm:8.0.2" + dependencies: + "@metamask/rpc-errors": ^6.2.1 + "@metamask/safe-event-emitter": ^3.0.0 + "@metamask/utils": ^8.3.0 + checksum: c240d298ad503d93922a94a62cf59f0344b6d6644a523bc8ea3c0f321bea7172b89f2747a5618e2861b2e8152ae5086b76f391a10e4566529faa50b8850c051d + languageName: node + linkType: hard + "@metamask/json-rpc-engine@npm:^9.0.0": version: 9.0.0 resolution: "@metamask/json-rpc-engine@npm:9.0.0" @@ -2850,6 +2874,18 @@ __metadata: languageName: node linkType: hard +"@metamask/json-rpc-middleware-stream@npm:^8.0.0": + version: 8.0.0 + resolution: "@metamask/json-rpc-middleware-stream@npm:8.0.0" + dependencies: + "@metamask/json-rpc-engine": ^9.0.0 + "@metamask/safe-event-emitter": ^3.0.0 + "@metamask/utils": ^8.3.0 + readable-stream: ^3.6.2 + checksum: 4bf809366da41744c841dd50d68cf126e1cccda0d78a812154489faa2b0a56bbd511a7bb4e9ccc7c68f2a9a6437f00561bc9423a5b5596badd511a4ff6244c9e + languageName: node + linkType: hard + "@metamask/key-tree@npm:^9.0.0": version: 9.0.0 resolution: "@metamask/key-tree@npm:9.0.0" @@ -2935,26 +2971,26 @@ __metadata: languageName: node linkType: hard -"@metamask/phishing-controller@npm:^9.0.1": - version: 9.0.1 - resolution: "@metamask/phishing-controller@npm:9.0.1" +"@metamask/phishing-controller@npm:^10.0.0": + version: 10.0.0 + resolution: "@metamask/phishing-controller@npm:10.0.0" dependencies: - "@metamask/base-controller": ^5.0.1 - "@metamask/controller-utils": ^9.0.1 + "@metamask/base-controller": ^6.0.0 + "@metamask/controller-utils": ^11.0.0 "@types/punycode": ^2.1.0 eth-phishing-detect: ^1.2.0 punycode: ^2.1.1 - checksum: f8770b94d9d4e7f7daa5619d9bf32bc0909b6947dd72172ba76f085ca6e29bafa9d728f57e6ed296355f589ec6d267ee537587a7a70ccc2b2b971604e3ad0c8b + checksum: c9da583e8620dc0bb82e799305cccd1b0f54501c9a5b9321295049d08d16fff3bf4111d4c81c76c5d0f292d4c8e1113b3baef18d011bd09e6c2b2404c3d43557 languageName: node linkType: hard -"@metamask/post-message-stream@npm:^8.0.0": - version: 8.0.0 - resolution: "@metamask/post-message-stream@npm:8.0.0" +"@metamask/post-message-stream@npm:^8.1.0": + version: 8.1.0 + resolution: "@metamask/post-message-stream@npm:8.1.0" dependencies: "@metamask/utils": ^8.1.0 readable-stream: 3.6.2 - checksum: 3016d8d5f8a5954fd146ce06c0b5fd7a9a070b43284e2bad140e179ee259146b666d56e6dbefa0277f56fbb67806970c9de3067c75f0e56886d0752e7c0f5e22 + checksum: 84b5f90ee28d3440520088c01fb64c42a2ed3e761bef4285c8dd72f78c3f634d58ac3314c5ebaedabc92e3db369960e17d61b84719f2d6271cd6d4957f2b6704 languageName: node linkType: hard @@ -3092,27 +3128,28 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-controllers@npm:^7.0.0": - version: 7.0.1 - resolution: "@metamask/snaps-controllers@npm:7.0.1" +"@metamask/snaps-controllers@npm:^9.1.0": + version: 9.1.0 + resolution: "@metamask/snaps-controllers@npm:9.1.0" dependencies: - "@metamask/approval-controller": ^6.0.1 - "@metamask/base-controller": ^5.0.1 - "@metamask/json-rpc-engine": ^8.0.1 - "@metamask/json-rpc-middleware-stream": ^7.0.1 + "@metamask/approval-controller": ^7.0.0 + "@metamask/base-controller": ^6.0.0 + "@metamask/json-rpc-engine": ^9.0.0 + "@metamask/json-rpc-middleware-stream": ^8.0.0 "@metamask/object-multiplex": ^2.0.0 - "@metamask/permission-controller": ^9.0.2 - "@metamask/phishing-controller": ^9.0.1 - "@metamask/post-message-stream": ^8.0.0 + "@metamask/permission-controller": ^10.0.0 + "@metamask/phishing-controller": ^10.0.0 + "@metamask/post-message-stream": ^8.1.0 "@metamask/rpc-errors": ^6.2.1 "@metamask/snaps-registry": ^3.1.0 - "@metamask/snaps-rpc-methods": ^8.0.0 - "@metamask/snaps-sdk": ^4.0.0 - "@metamask/snaps-utils": ^7.1.0 + "@metamask/snaps-rpc-methods": ^9.1.4 + "@metamask/snaps-sdk": ^6.0.0 + "@metamask/snaps-utils": ^7.7.0 "@metamask/utils": ^8.3.0 "@xstate/fsm": ^2.0.0 browserify-zlib: ^0.2.0 concat-stream: ^2.0.0 + fast-deep-equal: ^3.1.3 get-npm-tarball-url: ^2.0.3 immer: ^9.0.6 nanoid: ^3.1.31 @@ -3120,61 +3157,62 @@ __metadata: readable-web-to-node-stream: ^3.0.2 tar-stream: ^3.1.7 peerDependencies: - "@metamask/snaps-execution-environments": ^6.0.0 + "@metamask/snaps-execution-environments": ^6.5.0 peerDependenciesMeta: "@metamask/snaps-execution-environments": optional: true - checksum: d8a23ebf81b5a3276cec041588e56b23a7b18cc7d6ea4b7b244aac6db6b9276db0687efc95de02043e8907d4b1ddf5de74b36e4f93b6f8aab121dc22ba5d43a1 + checksum: b5a41159a8bb2f65f89f15b7f05ad3cb94dfe9ea72064bebdaaa370eae4ef48c7dbb36951121187183398568adc9f9eef6185c19fa6029dae1f115f921669a69 languageName: node linkType: hard -"@metamask/snaps-execution-environments@npm:^6.0.0": - version: 6.0.0 - resolution: "@metamask/snaps-execution-environments@npm:6.0.0" +"@metamask/snaps-execution-environments@npm:^6.5.0": + version: 6.5.0 + resolution: "@metamask/snaps-execution-environments@npm:6.5.0" dependencies: - "@metamask/json-rpc-engine": ^8.0.1 + "@metamask/json-rpc-engine": ^9.0.0 "@metamask/object-multiplex": ^2.0.0 - "@metamask/post-message-stream": ^8.0.0 - "@metamask/providers": ^16.0.0 + "@metamask/post-message-stream": ^8.1.0 + "@metamask/providers": ^17.0.0 "@metamask/rpc-errors": ^6.2.1 - "@metamask/snaps-sdk": ^4.0.0 - "@metamask/snaps-utils": ^7.1.0 + "@metamask/snaps-sdk": ^6.0.0 + "@metamask/snaps-utils": ^7.7.0 "@metamask/utils": ^8.3.0 nanoid: ^3.1.31 readable-stream: ^3.6.2 superstruct: ^1.0.3 - checksum: 367e8f09843f36a74969ea09ba724ff66cea66ecadbd1306bbd1c43937cf51a22cf342f81a56f8f45abe2a2a914f9316dec3e9a9c64a8bb215957563c963ab51 + checksum: be55289a38b4d147012af0c23820850186989f7d6b7bd851a32518ed62ecddcea9e03943644a77973818d7af7abdcd002028faac51558249d2efa6cf79fbe12d languageName: node linkType: hard -"@metamask/snaps-jest@npm:^7.0.0": - version: 7.0.0 - resolution: "@metamask/snaps-jest@npm:7.0.0" +"@metamask/snaps-jest@npm:^8.2.0": + version: 8.2.0 + resolution: "@metamask/snaps-jest@npm:8.2.0" dependencies: "@jest/environment": ^29.5.0 "@jest/expect": ^29.5.0 "@jest/globals": ^29.5.0 - "@metamask/base-controller": ^5.0.1 - "@metamask/eth-json-rpc-middleware": ^12.1.0 - "@metamask/json-rpc-engine": ^8.0.1 - "@metamask/json-rpc-middleware-stream": ^7.0.1 - "@metamask/key-tree": ^9.0.0 - "@metamask/permission-controller": ^9.0.2 - "@metamask/snaps-controllers": ^7.0.0 - "@metamask/snaps-execution-environments": ^6.0.0 - "@metamask/snaps-rpc-methods": ^8.0.0 - "@metamask/snaps-sdk": ^4.0.0 - "@metamask/snaps-utils": ^7.1.0 + "@metamask/base-controller": ^6.0.0 + "@metamask/eth-json-rpc-middleware": ^12.1.2 + "@metamask/json-rpc-engine": ^9.0.0 + "@metamask/json-rpc-middleware-stream": ^8.0.0 + "@metamask/key-tree": ^9.1.1 + "@metamask/permission-controller": ^10.0.0 + "@metamask/snaps-controllers": ^9.1.0 + "@metamask/snaps-execution-environments": ^6.5.0 + "@metamask/snaps-rpc-methods": ^9.1.4 + "@metamask/snaps-sdk": ^6.0.0 + "@metamask/snaps-utils": ^7.7.0 "@metamask/utils": ^8.3.0 "@reduxjs/toolkit": ^1.9.5 express: ^4.18.2 jest-environment-node: ^29.5.0 jest-matcher-utils: ^29.5.0 + mime: ^3.0.0 readable-stream: ^3.6.2 redux: ^4.2.1 redux-saga: ^1.2.3 superstruct: ^1.0.3 - checksum: aaf1d6541f3fd34173af454c6213a7934158c17577e6955d29ae89060eda281ab95fe00c4ac9b452e5d810f5e1ab8b0b0649e93c2e0f97780a845b1bb3014724 + checksum: 616d89156a4151f48867ed66fcdfacd44ddfdc292eed653efb8ebc471a315210dc540830ff0b69e41cebff4d2138a012e7c70d48c768cf0282ce0ec98fb4fe77 languageName: node linkType: hard @@ -3190,19 +3228,19 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-rpc-methods@npm:^8.0.0": - version: 8.0.0 - resolution: "@metamask/snaps-rpc-methods@npm:8.0.0" +"@metamask/snaps-rpc-methods@npm:^9.1.4": + version: 9.1.4 + resolution: "@metamask/snaps-rpc-methods@npm:9.1.4" dependencies: - "@metamask/key-tree": ^9.0.0 - "@metamask/permission-controller": ^9.0.2 + "@metamask/key-tree": ^9.1.1 + "@metamask/permission-controller": ^10.0.0 "@metamask/rpc-errors": ^6.2.1 - "@metamask/snaps-sdk": ^4.0.0 - "@metamask/snaps-utils": ^7.1.0 + "@metamask/snaps-sdk": ^6.0.0 + "@metamask/snaps-utils": ^7.7.0 "@metamask/utils": ^8.3.0 "@noble/hashes": ^1.3.1 superstruct: ^1.0.3 - checksum: 219e166b9a1b0653db8c679319ee9022244e697575023dcccbab571faf9411bf88e1139049745a4d7949c1e6a4ae621e20a5e5e4c31f8b68e1f146117f0b8150 + checksum: f32775c53afb83f6f6907e72bec412ba21a8535c50910d2e2fac7efa68bac7d62dd162ca0329297287b4f8f507f9fda2dcc4396966931ce8e9331d5fddbfc343 languageName: node linkType: hard @@ -3220,20 +3258,6 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-sdk@npm:^4.0.0": - version: 4.0.0 - resolution: "@metamask/snaps-sdk@npm:4.0.0" - dependencies: - "@metamask/key-tree": ^9.0.0 - "@metamask/providers": ^16.0.0 - "@metamask/rpc-errors": ^6.2.1 - "@metamask/utils": ^8.3.0 - fast-xml-parser: ^4.3.4 - superstruct: ^1.0.3 - checksum: 01b485b05715f7fff3527b8cac5be180f2443797b05839f615c59ac2c95860b68509c7e7c0eec0d921b04b099f5e7bc99bcb2447373e866649b8bc8f29b738ec - languageName: node - linkType: hard - "@metamask/snaps-sdk@npm:^4.1.0": version: 4.4.2 resolution: "@metamask/snaps-sdk@npm:4.4.2" @@ -3261,6 +3285,19 @@ __metadata: languageName: node linkType: hard +"@metamask/snaps-sdk@npm:^6.0.0": + version: 6.0.0 + resolution: "@metamask/snaps-sdk@npm:6.0.0" + dependencies: + "@metamask/key-tree": ^9.1.1 + "@metamask/providers": ^17.0.0 + "@metamask/rpc-errors": ^6.2.1 + "@metamask/utils": ^8.3.0 + superstruct: ^1.0.3 + checksum: 0a3b7a034028a7583b4e1a5414a67470b2ed70cc411fc4877a79f95803c64d99eafb785cbffaf827c3f3138a065e439480b9628456a8a5fa8d39c9c8dd9bd5db + languageName: node + linkType: hard + "@metamask/snaps-utils@npm:^7.0.1": version: 7.0.4 resolution: "@metamask/snaps-utils@npm:7.0.4" @@ -3291,19 +3328,19 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-utils@npm:^7.1.0": - version: 7.1.0 - resolution: "@metamask/snaps-utils@npm:7.1.0" +"@metamask/snaps-utils@npm:^7.3.0": + version: 7.6.0 + resolution: "@metamask/snaps-utils@npm:7.6.0" dependencies: "@babel/core": ^7.23.2 "@babel/types": ^7.23.0 - "@metamask/base-controller": ^5.0.1 - "@metamask/key-tree": ^9.0.0 - "@metamask/permission-controller": ^9.0.2 + "@metamask/base-controller": ^6.0.0 + "@metamask/key-tree": ^9.1.1 + "@metamask/permission-controller": ^10.0.0 "@metamask/rpc-errors": ^6.2.1 "@metamask/slip44": ^3.1.0 "@metamask/snaps-registry": ^3.1.0 - "@metamask/snaps-sdk": ^4.0.0 + "@metamask/snaps-sdk": ^5.0.0 "@metamask/utils": ^8.3.0 "@noble/hashes": ^1.3.1 "@scure/base": ^1.1.1 @@ -3311,19 +3348,20 @@ __metadata: cron-parser: ^4.5.0 fast-deep-equal: ^3.1.3 fast-json-stable-stringify: ^2.1.0 + fast-xml-parser: ^4.3.4 marked: ^12.0.1 rfdc: ^1.3.0 semver: ^7.5.4 ses: ^1.1.0 superstruct: ^1.0.3 validate-npm-package-name: ^5.0.0 - checksum: ecd081596930d8337b9f054e2612f04bfdab1c4d46fb395a8ad8cb7263d0f5ebb6e7a1988168a46a794ca065fe3537959b68cb7b07a80346ff372be160d68601 + checksum: 53c215ef8eb899c3707b6279a15bc74e6f967b8f6d8471f74cf011321db54715eddbe4d445686471d416ff270664644808d5e2c4f8683d6511b5a570235e6ce7 languageName: node linkType: hard -"@metamask/snaps-utils@npm:^7.3.0": - version: 7.6.0 - resolution: "@metamask/snaps-utils@npm:7.6.0" +"@metamask/snaps-utils@npm:^7.7.0": + version: 7.7.0 + resolution: "@metamask/snaps-utils@npm:7.7.0" dependencies: "@babel/core": ^7.23.2 "@babel/types": ^7.23.0 @@ -3333,7 +3371,7 @@ __metadata: "@metamask/rpc-errors": ^6.2.1 "@metamask/slip44": ^3.1.0 "@metamask/snaps-registry": ^3.1.0 - "@metamask/snaps-sdk": ^5.0.0 + "@metamask/snaps-sdk": ^6.0.0 "@metamask/utils": ^8.3.0 "@noble/hashes": ^1.3.1 "@scure/base": ^1.1.1 @@ -3348,7 +3386,7 @@ __metadata: ses: ^1.1.0 superstruct: ^1.0.3 validate-npm-package-name: ^5.0.0 - checksum: 53c215ef8eb899c3707b6279a15bc74e6f967b8f6d8471f74cf011321db54715eddbe4d445686471d416ff270664644808d5e2c4f8683d6511b5a570235e6ce7 + checksum: e801f4ce39c05e7d328e13968174f6d61dd388404218f8cafa43cccd0b54cfe46473d82e03ec1654a0db28a9a46238380bab45d67edf12d81392393246127c71 languageName: node linkType: hard @@ -9713,19 +9751,6 @@ __metadata: languageName: node linkType: hard -"eth-block-tracker@npm:^8.0.0": - version: 8.1.0 - resolution: "eth-block-tracker@npm:8.1.0" - dependencies: - "@metamask/eth-json-rpc-provider": ^2.1.0 - "@metamask/safe-event-emitter": ^3.0.0 - "@metamask/utils": ^8.1.0 - json-rpc-random-id: ^1.0.1 - pify: ^5.0.0 - checksum: a7e1e8462995d2924a2daa3224539c120df6c07a26d68522f4338ca23189d4195545e6251b8e64f79dc99a685a8124efd496e25f7ee201dc273d92e3d9e90aad - languageName: node - linkType: hard - "eth-ens-namehash@npm:^2.0.8": version: 2.0.8 resolution: "eth-ens-namehash@npm:2.0.8" @@ -13926,7 +13951,7 @@ __metadata: "@metamask/eslint-config-nodejs": ^12.1.0 "@metamask/eslint-config-typescript": ^12.1.0 "@metamask/snaps-cli": ^6.2.0 - "@metamask/snaps-jest": ^7.0.0 + "@metamask/snaps-jest": ^8.2.0 "@metamask/snaps-sdk": ^5.0.0 "@typescript-eslint/eslint-plugin": ^5.42.1 "@typescript-eslint/parser": ^5.42.1