From 51518c42bbbd84186900800727894a131df0388f Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Mon, 23 Jan 2023 20:41:04 +0100 Subject: [PATCH] [FLASK] `snaps-monorepo@0.28.0` (#17277) * snaps-monorepo@0.28.0 * Update LavaMoat policies * Remove old blocklist implementation, add feature flags * Lint * Update iframe execution environment * Change getPrimaryKeyringMnemonic return type * Update tests * Update key-tree --- app/scripts/flask/snaps-blocklist.js | 24 ---- app/scripts/flask/snaps-utilities.js | 35 ----- app/scripts/flask/snaps-utilities.test.js | 127 ------------------ app/scripts/metamask-controller.js | 25 ++-- app/scripts/metamask-controller.test.js | 4 +- lavamoat/browserify/beta/policy.json | 8 +- lavamoat/browserify/flask/policy.json | 35 ++--- lavamoat/browserify/main/policy.json | 8 +- package.json | 8 +- yarn.lock | 149 +++++++++++----------- 10 files changed, 109 insertions(+), 314 deletions(-) delete mode 100644 app/scripts/flask/snaps-blocklist.js delete mode 100644 app/scripts/flask/snaps-utilities.js delete mode 100644 app/scripts/flask/snaps-utilities.test.js diff --git a/app/scripts/flask/snaps-blocklist.js b/app/scripts/flask/snaps-blocklist.js deleted file mode 100644 index 470eb828b..000000000 --- a/app/scripts/flask/snaps-blocklist.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Represents a list of Snaps that are not allowed to be used. - * Can be blocked by [ID, VERSION] or SHASUM of a source code (or both). - * - * Example: - * { - * id: 'npm:@consensys/snap-id', - * versionRange: '<0.1.11', - * shasum: 'TEIbWsAyQe/8rBNXOHx3bOP9YF61PIPP/YHeokLchJE=', - * }, - * { - * shasum: 'eCYGZiYvZ3/uxkKI3npfl79kTQXS/5iD9ojsBS4A3rI=', - * }, - */ -export const SNAP_BLOCKLIST = [ - { - id: 'npm:@consensys/starknet-snap', - versionRange: '<0.1.11', - }, - { - // @consensys/starknet-snap v:0.1.10 - shasum: 'A83r5/ZIcKuKwuAnQHHByVFCuofj7jGK5hOStmHY6A0=', - }, -]; diff --git a/app/scripts/flask/snaps-utilities.js b/app/scripts/flask/snaps-utilities.js deleted file mode 100644 index 98bd2d340..000000000 --- a/app/scripts/flask/snaps-utilities.js +++ /dev/null @@ -1,35 +0,0 @@ -import { satisfies as satisfiesSemver } from 'semver'; - -/** - * Checks if provided snaps are on the block list. - * - * @param snapsToCheck - An object containing snap ids and other information. - * @param blocklist - An object containing snap ids, version or shasum of the blocked snaps. - * @returns An object structure containing snaps block information. - */ -async function checkSnapsBlockList(snapsToCheck, blocklist) { - return Object.entries(snapsToCheck).reduce((acc, [snapId, snapInfo]) => { - const blockInfo = blocklist.find( - (blocked) => - (blocked.id === snapId && - satisfiesSemver(snapInfo.version, blocked.versionRange, { - includePrerelease: true, - })) || - // Check for null/undefined for a case in which SnapController did not return - // a valid message. This will avoid blocking all snaps in the given case. - // Avoid having (undefined === undefined). - (blocked.shasum ? blocked.shasum === snapInfo.shasum : false), - ); - - acc[snapId] = blockInfo - ? { - blocked: true, - reason: blockInfo.reason, - infoUrl: blockInfo.infoUrl, - } - : { blocked: false }; - return acc; - }, {}); -} - -export { checkSnapsBlockList }; diff --git a/app/scripts/flask/snaps-utilities.test.js b/app/scripts/flask/snaps-utilities.test.js deleted file mode 100644 index abb8afa3a..000000000 --- a/app/scripts/flask/snaps-utilities.test.js +++ /dev/null @@ -1,127 +0,0 @@ -import { strict as assert } from 'assert'; -import { checkSnapsBlockList } from './snaps-utilities'; - -describe('Snaps Controller utilities', function () { - describe('checkSnapsBlockList', function () { - it('returns one of the given snaps as blocked by its version', async function () { - const mockBlocklist = [ - { - id: 'npm:@consensys/starknet-snap', - versionRange: '<0.1.11', - }, - ]; - const mockSnapsToBeChecked = { - 'npm:exampleA': { - version: '1.0.0', - shasum: 'F5IapP6v1Bp7bl16NkCszfOhtVSZAm362X5zl7wgMhI=', - }, - 'npm:exampleB': { - version: '1.0.0', - shasum: 'eCYGZiYvZ3/uxkKI3npfl79kTQXS/5iD9ojsBS4A3rI=', - }, - 'npm:@consensys/starknet-snap': { - version: '0.1.10', - shasum: 'A83r5/ZIcKuKwuAnQHHByVFCuofj7jGK5hOStmHY6A0=', - }, - }; - - const blockedSnaps = await checkSnapsBlockList( - mockSnapsToBeChecked, - mockBlocklist, - ); - assert.deepEqual(blockedSnaps, { - 'npm:exampleA': { blocked: false }, - 'npm:exampleB': { blocked: false }, - 'npm:@consensys/starknet-snap': { - blocked: true, - reason: undefined, - infoUrl: undefined, - }, - }); - }); - - it('returns given snap as blocked by its shasum', async function () { - const mockBlocklist = [ - { - shasum: 'A83r5/ZIcKuKwuAnQHHByVFCuofj7jGK5hOStmHY6A0=', - }, - ]; - const mockSnapsToBeChecked = { - 'npm:@consensys/starknet-snap': { - version: '0.3.15', // try to fake version with the same source sha - shasum: 'A83r5/ZIcKuKwuAnQHHByVFCuofj7jGK5hOStmHY6A0=', - }, - }; - - const blockedSnaps = await checkSnapsBlockList( - mockSnapsToBeChecked, - mockBlocklist, - ); - assert.deepEqual(blockedSnaps, { - 'npm:@consensys/starknet-snap': { - blocked: true, - reason: undefined, - infoUrl: undefined, - }, - }); - }); - - it('returns false for blocked for the same blocklisted snap but different version', async function () { - const mockBlocklist = [ - { - id: 'npm:@consensys/starknet-snap', - versionRange: '<0.1.11', - }, - ]; - const mockSnapsToBeChecked = { - 'npm:@consensys/starknet-snap': { - version: '0.2.1', - shasum: 'Z4jo37WG1E2rxqF05WaXOSUDxR5upUmOdaTvmgVY/L0=', - }, - }; - - const blockedSnaps = await checkSnapsBlockList( - mockSnapsToBeChecked, - mockBlocklist, - ); - assert.deepEqual(blockedSnaps, { - 'npm:@consensys/starknet-snap': { - blocked: false, - }, - }); - }); - - it('returns false for blocked for multiple snaps that are not on the blocklist', async function () { - const mockBlocklist = [ - { - id: 'npm:@consensys/starknet-snap', - versionRange: '<0.1.11', - }, - ]; - const mockSnapsToBeChecked = { - 'npm:exampleA': { - version: '1.0.0', - shasum: 'F5IapP6v1Bp7bl16NkCszfOhtVSZAm362X5zl7wgMhI=', - }, - 'npm:exampleB': { - version: '2.1.3', - shasum: 'eCYGZiYvZ3/uxkKI3npfl79kTQXS/5iD9ojsBS4A3rI=', - }, - 'npm:exampleC': { - version: '3.7.9', - shasum: '2QqUxo5joo4kKKr7yiCjdYsZOZcIFBnIBEdwU9Yx7+M=', - }, - }; - - const blockedSnaps = await checkSnapsBlockList( - mockSnapsToBeChecked, - mockBlocklist, - ); - assert.deepEqual(blockedSnaps, { - 'npm:exampleA': { blocked: false }, - 'npm:exampleB': { blocked: false }, - 'npm:exampleC': { blocked: false }, - }); - }); - }); -}); diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 3488d114b..09ee91298 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -60,8 +60,6 @@ import { } from '@metamask/snaps-controllers'; ///: END:ONLY_INCLUDE_IN -import { wordlist as englishWordlist } from '@metamask/scure-bip39/dist/wordlists/english'; - import browser from 'webextension-polyfill'; import { AssetType, @@ -169,10 +167,6 @@ import { ///: END:ONLY_INCLUDE_IN } from './controllers/permissions'; import createRPCMethodTrackingMiddleware from './lib/createRPCMethodTrackingMiddleware'; -///: BEGIN:ONLY_INCLUDE_IN(flask) -import { checkSnapsBlockList } from './flask/snaps-utilities'; -import { SNAP_BLOCKLIST } from './flask/snaps-blocklist'; -///: END:ONLY_INCLUDE_IN import { securityProviderCheck } from './lib/security-provider-helpers'; export const METAMASK_CONTROLLER_EVENTS = { @@ -741,7 +735,7 @@ export default class MetamaskController extends EventEmitter { ///: BEGIN:ONLY_INCLUDE_IN(flask) this.snapExecutionService = new IframeExecutionService({ iframeUrl: new URL( - 'https://metamask.github.io/iframe-execution-environment/0.11.1', + 'https://metamask.github.io/iframe-execution-environment/0.12.0', ), messenger: this.controllerMessenger.getRestricted({ name: 'ExecutionService', @@ -776,15 +770,19 @@ export default class MetamaskController extends EventEmitter { ], }); + const isMain = process.env.METAMASK_BUILD_TYPE === 'main'; + const isFlask = process.env.METAMASK_BUILD_TYPE === 'flask'; + this.snapController = new SnapController({ environmentEndowmentPermissions: Object.values(EndowmentPermissions), closeAllConnections: this.removeAllConnections.bind(this), - checkBlockList: async (snapsToCheck) => { - return checkSnapsBlockList(snapsToCheck, SNAP_BLOCKLIST); - }, state: initState.SnapController, messenger: snapControllerMessenger, - featureFlags: { dappsCanUpdateSnaps: true }, + featureFlags: { + dappsCanUpdateSnaps: true, + allowLocalSnaps: isFlask, + requireAllowlist: isMain, + }, }); this.notificationController = new NotificationController({ @@ -2579,10 +2577,7 @@ export default class MetamaskController extends EventEmitter { throw new Error('Primary keyring mnemonic unavailable.'); } - const recoveredIndices = Array.from( - new Uint16Array(new Uint8Array(keyring.mnemonic).buffer), - ); - return recoveredIndices.map((i) => englishWordlist[i]).join(' '); + return keyring.mnemonic; } // diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js index 41b429334..698b6496b 100644 --- a/app/scripts/metamask-controller.test.js +++ b/app/scripts/metamask-controller.test.js @@ -514,7 +514,7 @@ describe('MetaMaskController', function () { }); describe('getPrimaryKeyringMnemonic', function () { - it('should return a mnemonic as a string', function () { + it('should return a mnemonic as a Uint8Array', function () { const mockMnemonic = 'above mercy benefit hospital call oval domain student sphere interest argue shock'; const mnemonicIndices = mockMnemonic @@ -534,7 +534,7 @@ describe('MetaMaskController', function () { const recoveredMnemonic = metamaskController.getPrimaryKeyringMnemonic(); - assert.equal(recoveredMnemonic, mockMnemonic); + assert.equal(recoveredMnemonic, uint8ArrayMnemonic); }); }); diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index bdb811f28..2208d70df 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1044,7 +1044,7 @@ "packages": { "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": true, "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": true, + "@metamask/scure-bip39": true, "@metamask/snaps-utils>@noble/hashes": true, "@metamask/snaps-utils>@scure/base": true, "@metamask/utils": true @@ -1066,12 +1066,6 @@ "browserify>browser-resolve": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": { - "packages": { - "@metamask/snaps-utils>@noble/hashes": true, - "@metamask/snaps-utils>@scure/base": true - } - }, "@metamask/rpc-methods>nanoid": { "globals": { "crypto.getRandomValues": true diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 80c7fba2d..6a0915e95 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1035,19 +1035,16 @@ "globals": { "WorkerGlobalScope": true, "addEventListener": true, + "browser": true, + "chrome": true, "location.origin": true, "onmessage": "write", "postMessage": true, "removeEventListener": true }, "packages": { - "@metamask/post-message-stream>@metamask/utils": true, - "@metamask/post-message-stream>readable-stream": true - } - }, - "@metamask/post-message-stream>@metamask/utils": { - "packages": { - "eslint>fast-deep-equal": true + "@metamask/post-message-stream>readable-stream": true, + "@metamask/utils": true } }, "@metamask/post-message-stream>readable-stream": { @@ -1114,10 +1111,10 @@ "@metamask/rpc-methods>@metamask/key-tree": true, "@metamask/rpc-methods>nanoid": true, "@metamask/snaps-ui": true, - "@metamask/snaps-ui>superstruct": true, "@metamask/snaps-utils": true, "@metamask/snaps-utils>@noble/hashes": true, "@metamask/utils": true, + "@metamask/utils>superstruct": true, "eth-rpc-errors": true } }, @@ -1139,7 +1136,7 @@ "packages": { "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": true, "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": true, + "@metamask/scure-bip39": true, "@metamask/snaps-utils>@noble/hashes": true, "@metamask/snaps-utils>@scure/base": true, "@metamask/utils": true @@ -1161,12 +1158,6 @@ "browserify>browser-resolve": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": { - "packages": { - "@metamask/snaps-utils>@noble/hashes": true, - "@metamask/snaps-utils>@scure/base": true - } - }, "@metamask/rpc-methods>nanoid": { "globals": { "crypto.getRandomValues": true @@ -1216,13 +1207,13 @@ "@metamask/snaps-controllers": { "globals": { "URL": true, + "chrome.offscreen.createDocument": true, + "chrome.offscreen.hasDocument": true, "clearTimeout": true, "console.error": true, "console.info": true, "console.log": true, "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true, "document.getElementById": true, "fetch.bind": true, "setTimeout": true @@ -1406,23 +1397,25 @@ }, "@metamask/snaps-ui": { "packages": { - "@metamask/snaps-ui>superstruct": true, - "@metamask/utils": true + "@metamask/utils": true, + "@metamask/utils>superstruct": true } }, "@metamask/snaps-utils": { "globals": { "TextDecoder": true, - "URL": true + "URL": true, + "document.body.appendChild": true, + "document.createElement": true }, "packages": { - "@metamask/snaps-ui>superstruct": true, "@metamask/snaps-utils>@noble/hashes": true, "@metamask/snaps-utils>@scure/base": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, "@metamask/utils": true, + "@metamask/utils>superstruct": true, "semver": true } }, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index bdb811f28..2208d70df 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1044,7 +1044,7 @@ "packages": { "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": true, "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": true, + "@metamask/scure-bip39": true, "@metamask/snaps-utils>@noble/hashes": true, "@metamask/snaps-utils>@scure/base": true, "@metamask/utils": true @@ -1066,12 +1066,6 @@ "browserify>browser-resolve": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": { - "packages": { - "@metamask/snaps-utils>@noble/hashes": true, - "@metamask/snaps-utils>@scure/base": true - } - }, "@metamask/rpc-methods>nanoid": { "globals": { "crypto.getRandomValues": true diff --git a/package.json b/package.json index d48f8d2d2..a84f6b9f4 100644 --- a/package.json +++ b/package.json @@ -236,13 +236,13 @@ "@metamask/post-message-stream": "^6.0.0", "@metamask/providers": "^10.2.1", "@metamask/rate-limit-controller": "^1.0.0", - "@metamask/rpc-methods": "^0.27.1", + "@metamask/rpc-methods": "^0.28.0", "@metamask/scure-bip39": "^2.0.3", "@metamask/slip44": "^2.1.0", "@metamask/smart-transactions-controller": "^3.1.0", - "@metamask/snaps-controllers": "^0.27.1", - "@metamask/snaps-ui": "^0.27.1", - "@metamask/snaps-utils": "^0.27.1", + "@metamask/snaps-controllers": "^0.28.0", + "@metamask/snaps-ui": "^0.28.0", + "@metamask/snaps-utils": "^0.28.0", "@metamask/subject-metadata-controller": "^1.0.0", "@metamask/utils": "^3.4.1", "@ngraveio/bc-ur": "^1.1.6", diff --git a/yarn.lock b/yarn.lock index fd7d526b5..037d6cc35 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3847,17 +3847,17 @@ __metadata: languageName: node linkType: hard -"@metamask/key-tree@npm:^6.0.0": - version: 6.0.0 - resolution: "@metamask/key-tree@npm:6.0.0" +"@metamask/key-tree@npm:^6.2.0": + version: 6.2.1 + resolution: "@metamask/key-tree@npm:6.2.1" dependencies: + "@metamask/scure-bip39": ^2.1.0 "@metamask/utils": ^3.3.0 "@noble/ed25519": ^1.6.0 "@noble/hashes": ^1.0.0 "@noble/secp256k1": ^1.5.5 "@scure/base": ^1.0.0 - "@scure/bip39": ^1.0.0 - checksum: 124e1c8195c7a50b8f1fbdc1762c79e024efa3feee921142c64c547963e94ca746f508d41286b57ea0decafa0923ec835c59da3ec4be88b2cb44c4b844a241ac + checksum: 78931e20a2c933535c17d21e092dbc66e3e96f3c171a6814af51830b7774dd3b4059326180a3b1f52e48a258254a7ea70a31d0c335bf24a8c4250f8d196bc7ba languageName: node linkType: hard @@ -4012,13 +4012,13 @@ __metadata: languageName: node linkType: hard -"@metamask/post-message-stream@npm:^6.0.0": - version: 6.0.0 - resolution: "@metamask/post-message-stream@npm:6.0.0" +"@metamask/post-message-stream@npm:^6.0.0, @metamask/post-message-stream@npm:^6.1.0": + version: 6.1.0 + resolution: "@metamask/post-message-stream@npm:6.1.0" dependencies: - "@metamask/utils": ^2.0.0 + "@metamask/utils": ^3.0.1 readable-stream: 2.3.3 - checksum: 2909b92b1372f88e072d22ea833c8d722c20e5584e11d765705193641bdb37f0cbbdb8ba1923f6a6d511771daef8c877b7ef874d7413d75ea5184ab57078c82b + checksum: 2503f3fbce7f9c8372ccc429253688f296876ccb83e7c55e8cbc512e7004d84555f111c75c0f81444a6f8148533a86d537bffa9fad9b5c8b13727615a96b32fe languageName: node linkType: hard @@ -4063,22 +4063,22 @@ __metadata: languageName: node linkType: hard -"@metamask/rpc-methods@npm:^0.27.1": - version: 0.27.1 - resolution: "@metamask/rpc-methods@npm:0.27.1" +"@metamask/rpc-methods@npm:^0.28.0": + version: 0.28.0 + resolution: "@metamask/rpc-methods@npm:0.28.0" dependencies: "@metamask/browser-passworder": ^4.0.2 - "@metamask/key-tree": ^6.0.0 + "@metamask/key-tree": ^6.2.0 "@metamask/permission-controller": ^1.0.1 - "@metamask/snaps-ui": ^0.27.1 - "@metamask/snaps-utils": ^0.27.1 + "@metamask/snaps-ui": ^0.28.0 + "@metamask/snaps-utils": ^0.28.0 "@metamask/types": ^1.1.0 - "@metamask/utils": ^3.3.1 + "@metamask/utils": ^3.4.1 "@noble/hashes": ^1.1.3 eth-rpc-errors: ^4.0.2 nanoid: ^3.1.31 - superstruct: ^0.16.7 - checksum: 1fa846c7889c5667c0724b62adcee7fbbfaf1e84f319eb1f123caf5c80249fa18ac0748e6087d457e59464013a81a063db7260bb464162004ba961db5a0b1be2 + superstruct: ^1.0.3 + checksum: 4dcdd25a8462a3ba38898637d2f64250c7d173c601f22133332c41401c13cb465ead719f3233f9749a894857f2ffc329936d3b84221ff60355473b3e9c212598 languageName: node linkType: hard @@ -4089,13 +4089,13 @@ __metadata: languageName: node linkType: hard -"@metamask/scure-bip39@npm:^2.0.3": - version: 2.0.3 - resolution: "@metamask/scure-bip39@npm:2.0.3" +"@metamask/scure-bip39@npm:^2.0.3, @metamask/scure-bip39@npm:^2.1.0": + version: 2.1.0 + resolution: "@metamask/scure-bip39@npm:2.1.0" dependencies: "@noble/hashes": ~1.1.1 "@scure/base": ~1.1.0 - checksum: a1655adbab6165c833db7e1a2f46a9617503b79016b06e025e15babd5ba8bce682598fe939851ce88fff451c9833e0362003c9ba7c68b3bf1e7cc09bdfe9fa4c + checksum: 13e07f03077472e9b230f702cbba7848ecac752028396647ccdeedd7bc280ceb50ee15203e25603f05c4c6ca5d4dc7277825f7004beb113e1a415adc91f059f9 languageName: node linkType: hard @@ -4125,20 +4125,21 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-controllers@npm:^0.27.1": - version: 0.27.1 - resolution: "@metamask/snaps-controllers@npm:0.27.1" +"@metamask/snaps-controllers@npm:^0.28.0": + version: 0.28.0 + resolution: "@metamask/snaps-controllers@npm:0.28.0" dependencies: "@metamask/approval-controller": ^1.0.1 "@metamask/base-controller": ^1.1.1 "@metamask/object-multiplex": ^1.1.0 "@metamask/permission-controller": ^1.0.1 - "@metamask/post-message-stream": ^6.0.0 - "@metamask/rpc-methods": ^0.27.1 - "@metamask/snaps-execution-environments": ^0.27.1 - "@metamask/snaps-utils": ^0.27.1 + "@metamask/post-message-stream": ^6.1.0 + "@metamask/rpc-methods": ^0.28.0 + "@metamask/snaps-execution-environments": ^0.28.0 + "@metamask/snaps-registry": ^1.0.0 + "@metamask/snaps-utils": ^0.28.0 "@metamask/subject-metadata-controller": ^1.0.1 - "@metamask/utils": ^3.3.1 + "@metamask/utils": ^3.4.1 "@xstate/fsm": ^2.0.0 concat-stream: ^2.0.0 cron-parser: ^4.5.0 @@ -4151,48 +4152,59 @@ __metadata: pump: ^3.0.0 readable-web-to-node-stream: ^3.0.2 tar-stream: ^2.2.0 - checksum: 74b2717e2282670fbf4e15439e56fd10ee12bc5284797bbe6ab5705dafbf094094122e59e46ccbfb054b6db2b7ff0a053b87ebb1f7eea1f8edb79edb18ca1021 + checksum: 27b641ed7998e1cc52be354aab19ce6034aa2ec1df3f5f14e07d144ce029472f8f89b8896c32a3124489283ed26666f84b67412cdd213445e80975e2a324f3a2 languageName: node linkType: hard -"@metamask/snaps-execution-environments@npm:^0.27.1": - version: 0.27.1 - resolution: "@metamask/snaps-execution-environments@npm:0.27.1" +"@metamask/snaps-execution-environments@npm:^0.28.0": + version: 0.28.0 + resolution: "@metamask/snaps-execution-environments@npm:0.28.0" dependencies: "@metamask/object-multiplex": ^1.2.0 - "@metamask/post-message-stream": ^6.0.0 + "@metamask/post-message-stream": ^6.1.0 "@metamask/providers": ^10.2.0 - "@metamask/snaps-utils": ^0.27.1 - "@metamask/utils": ^3.3.1 + "@metamask/snaps-utils": ^0.28.0 + "@metamask/utils": ^3.4.1 eth-rpc-errors: ^4.0.3 json-rpc-engine: ^6.1.0 pump: ^3.0.0 - ses: ^0.17.0 + ses: ^0.18.1 stream-browserify: ^3.0.0 - superstruct: ^0.16.7 - checksum: f2385b3e7e71a43acec77a82961ae2d72d6b6dd8fa56a5b392375c2988e32b1195f995ed682d91d450ef89ea364dd1e0ae28e9f2e7184c58e6dbe590ca6656b5 + superstruct: ^1.0.3 + checksum: db4d26728141d236d64720120fe57540ab13399c10fa7fdc697f888bf0f780f33f6c462409657b3a531a91cc0545fbf759b66d4fd1242955d75ddb331bcabad4 languageName: node linkType: hard -"@metamask/snaps-ui@npm:^0.27.1": - version: 0.27.1 - resolution: "@metamask/snaps-ui@npm:0.27.1" +"@metamask/snaps-registry@npm:^1.0.0": + version: 1.0.0 + resolution: "@metamask/snaps-registry@npm:1.0.0" dependencies: - "@metamask/utils": ^3.3.1 - superstruct: ^0.16.7 - checksum: bd068a251f2cecf39bb511c1b5d02e77c7b859f22bfc4b080775e9ecea0d59245c9448bfd17f15d2a801bc349c9b5a9957e4aa6a3b0140e6b27b28ac72f571b4 + "@metamask/utils": ^3.4.0 + superstruct: ^1.0.3 + checksum: 6a127d4d2db30e6f3966f4f82f3810a22a79db62c84b5db2b95d189dd36fe59aa5de59f01203095c9f7f07a44c1bf049c0fc046931269327d0693d1274f8f154 languageName: node linkType: hard -"@metamask/snaps-utils@npm:^0.27.1": - version: 0.27.1 - resolution: "@metamask/snaps-utils@npm:0.27.1" +"@metamask/snaps-ui@npm:^0.28.0": + version: 0.28.0 + resolution: "@metamask/snaps-ui@npm:0.28.0" + dependencies: + "@metamask/utils": ^3.4.1 + superstruct: ^1.0.3 + checksum: 19d28b279f1516ca90cc6d2ec45507b13186ab2cbfa554f72ae8e4c9e1437b773ac67fe38350bee78f47dd063b1cc3f04274e388d00b09e5e6c5938b273d6616 + languageName: node + linkType: hard + +"@metamask/snaps-utils@npm:^0.28.0": + version: 0.28.0 + resolution: "@metamask/snaps-utils@npm:0.28.0" dependencies: "@babel/core": ^7.18.6 "@babel/types": ^7.18.7 "@metamask/providers": ^10.2.1 - "@metamask/snaps-ui": ^0.27.1 - "@metamask/utils": ^3.3.1 + "@metamask/snaps-registry": ^1.0.0 + "@metamask/snaps-ui": ^0.28.0 + "@metamask/utils": ^3.4.1 "@noble/hashes": ^1.1.3 "@scure/base": ^1.1.1 cron-parser: ^4.5.0 @@ -4200,10 +4212,10 @@ __metadata: fast-deep-equal: ^3.1.3 rfdc: ^1.3.0 semver: ^7.3.7 - ses: ^0.17.0 - superstruct: ^0.16.7 + ses: ^0.18.1 + superstruct: ^1.0.3 validate-npm-package-name: ^5.0.0 - checksum: 77b8102449471e834a02a92a8334dff88b186c81a2ecf3a3c46ef9c6ceca8ea588d0ccc24a0c22ef38a111decf7b2f7988d72dbaec088776e42c9153bf62ed13 + checksum: 6c9653a9df3c77f5f2c69231d7e148d70fa001e42522e2e8f470f0e6fa1417b178d1b86515a231488a509589f98944cdf82a5ddc5e228f752d9ef81def393bb3 languageName: node linkType: hard @@ -4242,7 +4254,7 @@ __metadata: languageName: node linkType: hard -"@metamask/utils@npm:^3.0.1, @metamask/utils@npm:^3.0.3, @metamask/utils@npm:^3.3.0, @metamask/utils@npm:^3.3.1, @metamask/utils@npm:^3.4.1": +"@metamask/utils@npm:^3.0.1, @metamask/utils@npm:^3.0.3, @metamask/utils@npm:^3.3.0, @metamask/utils@npm:^3.4.0, @metamask/utils@npm:^3.4.1": version: 3.4.1 resolution: "@metamask/utils@npm:3.4.1" dependencies: @@ -4591,7 +4603,7 @@ __metadata: languageName: node linkType: hard -"@scure/bip39@npm:1.1.0, @scure/bip39@npm:^1.0.0": +"@scure/bip39@npm:1.1.0": version: 1.1.0 resolution: "@scure/bip39@npm:1.1.0" dependencies: @@ -24116,13 +24128,13 @@ __metadata: "@metamask/post-message-stream": ^6.0.0 "@metamask/providers": ^10.2.1 "@metamask/rate-limit-controller": ^1.0.0 - "@metamask/rpc-methods": ^0.27.1 + "@metamask/rpc-methods": ^0.28.0 "@metamask/scure-bip39": ^2.0.3 "@metamask/slip44": ^2.1.0 "@metamask/smart-transactions-controller": ^3.1.0 - "@metamask/snaps-controllers": ^0.27.1 - "@metamask/snaps-ui": ^0.27.1 - "@metamask/snaps-utils": ^0.27.1 + "@metamask/snaps-controllers": ^0.28.0 + "@metamask/snaps-ui": ^0.28.0 + "@metamask/snaps-utils": ^0.28.0 "@metamask/subject-metadata-controller": ^1.0.0 "@metamask/test-dapp": ^5.2.1 "@metamask/utils": ^3.4.1 @@ -30820,10 +30832,10 @@ __metadata: languageName: node linkType: hard -"ses@npm:^0.17.0": - version: 0.17.0 - resolution: "ses@npm:0.17.0" - checksum: c4c668de819b5366da7a9797d4ab0ec9c3efe4904ea64453cad5a48b659c77b817d589584019f5f7ca42802f640dcc706241543c1df00282473320a77397b641 +"ses@npm:^0.18.1": + version: 0.18.1 + resolution: "ses@npm:0.18.1" + checksum: 70ad6918da240833d445434e324f7ec29b1b7efc44ce8c0d75c5521cc1629810397903aec8e9adfe65d1486a19ac715c5254501e25de8925ae58c9f7f582dd76 languageName: node linkType: hard @@ -32372,13 +32384,6 @@ __metadata: languageName: node linkType: hard -"superstruct@npm:^0.16.7": - version: 0.16.7 - resolution: "superstruct@npm:0.16.7" - checksum: c8c855ff6945da8a41048c6d236de7b1af5d4d9c31742b3ee54d65647c31597488620281f65e095d5efc9e2fbdaad529b8c8f2506c12569d428467c835a21477 - languageName: node - linkType: hard - "superstruct@npm:^1.0.3": version: 1.0.3 resolution: "superstruct@npm:1.0.3"