From 7ba0f78a84c2c3a9bbd17b9d921a0700fafa0750 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Fri, 7 Oct 2022 10:02:35 +0200 Subject: [PATCH] [FLASK] `snaps-skunkworks@0.22.0` (#16069) * snaps-skunkworks@0.22.0 * Update LavaMoat policies * Bump execution environment and fix a breaking change * Fix caveat and permissions * Fix test * Exclude keyring endowment for now * Fix test * Fix snap_confirm missing title --- .../permissions/flask/snap-permissions.js | 9 +- .../controllers/permissions/specifications.js | 2 + .../permissions/specifications.test.js | 5 +- app/scripts/metamask-controller.js | 4 +- lavamoat/browserify/beta/policy.json | 28 ++---- lavamoat/browserify/flask/policy.json | 52 +++++------ lavamoat/browserify/main/policy.json | 28 ++---- package.json | 6 +- shared/constants/permissions.test.js | 5 +- shared/constants/permissions.ts | 3 +- .../flask/snap-confirm/snap-confirm.js | 4 +- yarn.lock | 87 ++++++++++--------- 12 files changed, 113 insertions(+), 120 deletions(-) diff --git a/app/scripts/controllers/permissions/flask/snap-permissions.js b/app/scripts/controllers/permissions/flask/snap-permissions.js index 07024c9ae19f..1a1d78c5d2d3 100644 --- a/app/scripts/controllers/permissions/flask/snap-permissions.js +++ b/app/scripts/controllers/permissions/flask/snap-permissions.js @@ -3,7 +3,10 @@ import { restrictedMethodPermissionBuilders, selectHooks, } from '@metamask/rpc-methods'; -import { ExcludedSnapPermissions } from '../../../../../shared/constants/permissions'; +import { + ExcludedSnapEndowments, + ExcludedSnapPermissions, +} from '../../../../../shared/constants/permissions'; /** * @returns {Record>} All endowment permission @@ -12,7 +15,9 @@ import { ExcludedSnapPermissions } from '../../../../../shared/constants/permiss export const buildSnapEndowmentSpecifications = () => Object.values(endowmentPermissionBuilders).reduce( (allSpecifications, { targetKey, specificationBuilder }) => { - allSpecifications[targetKey] = specificationBuilder(); + if (!ExcludedSnapEndowments.has(targetKey)) { + allSpecifications[targetKey] = specificationBuilder(); + } return allSpecifications; }, {}, diff --git a/app/scripts/controllers/permissions/specifications.js b/app/scripts/controllers/permissions/specifications.js index de6b1bdad89d..1e3fad4a4829 100644 --- a/app/scripts/controllers/permissions/specifications.js +++ b/app/scripts/controllers/permissions/specifications.js @@ -1,5 +1,6 @@ import { constructPermission, PermissionType } from '@metamask/controllers'; ///: BEGIN:ONLY_INCLUDE_IN(flask) +import { endowmentCaveatSpecifications as snapsEndowmentCaveatSpecifications } from '@metamask/snap-controllers'; import { caveatSpecifications as snapsCaveatsSpecifications } from '@metamask/rpc-methods'; ///: END:ONLY_INCLUDE_IN import { @@ -69,6 +70,7 @@ export const getCaveatSpecifications = ({ getIdentities }) => { ///: BEGIN:ONLY_INCLUDE_IN(flask) ...snapsCaveatsSpecifications, + ...snapsEndowmentCaveatSpecifications, ///: END:ONLY_INCLUDE_IN }; }; diff --git a/app/scripts/controllers/permissions/specifications.test.js b/app/scripts/controllers/permissions/specifications.test.js index e874d3aa6107..4d313b12ceb0 100644 --- a/app/scripts/controllers/permissions/specifications.test.js +++ b/app/scripts/controllers/permissions/specifications.test.js @@ -16,7 +16,7 @@ describe('PermissionController specifications', () => { describe('caveat specifications', () => { it('getCaveatSpecifications returns the expected specifications object', () => { const caveatSpecifications = getCaveatSpecifications({}); - expect(Object.keys(caveatSpecifications)).toHaveLength(3); + expect(Object.keys(caveatSpecifications)).toHaveLength(4); expect( caveatSpecifications[CaveatTypes.restrictReturnedAccounts].type, ).toStrictEqual(CaveatTypes.restrictReturnedAccounts); @@ -27,6 +27,9 @@ describe('PermissionController specifications', () => { expect(caveatSpecifications.permittedCoinTypes.type).toStrictEqual( SnapCaveatType.PermittedCoinTypes, ); + expect(caveatSpecifications.snapKeyring.type).toStrictEqual( + SnapCaveatType.SnapKeyring, + ); }); describe('restrictReturnedAccounts', () => { diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 9d24755f7b1d..51b753ac2179 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -654,7 +654,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.8.0', + 'https://metamask.github.io/iframe-execution-environment/0.9.0', ), messenger: this.controllerMessenger.getRestricted({ name: 'ExecutionService', @@ -3744,7 +3744,7 @@ export default class MetamaskController extends EventEmitter { ), getSnaps: this.controllerMessenger.call.bind( this.controllerMessenger, - 'SnapController:getSnaps', + 'SnapController:getPermittedSnaps', origin, ), requestPermissions: async (requestedPermissions) => { diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 2e1e455bc59c..3f8260c5eafb 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -682,11 +682,11 @@ "3box>ipfs>ipfs-unixfs-importer>async-iterator-batch": true, "3box>ipfs>ipfs-unixfs-importer>async-iterator-first": true, "3box>ipfs>ipfs-unixfs-importer>rabin-wasm": true, + "3box>ipfs>ipfs-unixfs-importer>superstruct": true, "3box>ipfs>ipld-dag-pb": true, "3box>ipfs>ipld-raw>multihashing-async": true, "3box>ipfs>multicodec": true, "3box>ipfs>multihashes": true, - "3box>ipfs>superstruct": true, "browserify>buffer": true, "madge>rc>deep-extend": true } @@ -841,11 +841,11 @@ "3box>ipfs>libp2p>libp2p-floodsub": true, "3box>ipfs>libp2p>libp2p-ping": true, "3box>ipfs>libp2p>libp2p-switch": true, + "3box>ipfs>libp2p>superstruct": true, "3box>ipfs>multiaddr": true, "3box>ipfs>peer-book": true, "3box>ipfs>peer-id": true, "3box>ipfs>peer-info": true, - "3box>ipfs>superstruct": true, "browserify>events": true, "browserify>insert-module-globals>is-buffer": true, "browserify>process": true, @@ -3068,20 +3068,13 @@ "setTimeout": true }, "packages": { - "@metamask/eth-json-rpc-infura>@metamask/utils": true, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true, + "eth-block-tracker>@metamask/utils": true, "eth-rpc-errors": true, "json-rpc-engine": true, "node-fetch": true } }, - "@metamask/eth-json-rpc-infura>@metamask/utils": { - "packages": { - "@metamask/eth-json-rpc-infura>@metamask/utils>superstruct": true, - "eslint>fast-deep-equal": true, - "nock>debug": true - } - }, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": { "globals": { "URL": true, @@ -4494,9 +4487,13 @@ } }, "eth-block-tracker>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, "packages": { + "@metamask/snap-utils>superstruct": true, "eslint>fast-deep-equal": true, - "eth-block-tracker>@metamask/utils>superstruct": true, "nock>debug": true } }, @@ -4553,7 +4550,7 @@ }, "packages": { "browserify>browser-resolve": true, - "eth-json-rpc-middleware>@metamask/utils": true, + "eth-block-tracker>@metamask/utils": true, "eth-json-rpc-middleware>eth-sig-util": true, "eth-json-rpc-middleware>pify": true, "eth-rpc-errors": true, @@ -4563,13 +4560,6 @@ "vinyl>clone": true } }, - "eth-json-rpc-middleware>@metamask/utils": { - "packages": { - "eslint>fast-deep-equal": true, - "eth-json-rpc-middleware>@metamask/utils>superstruct": true, - "nock>debug": true - } - }, "eth-json-rpc-middleware>eth-sig-util": { "packages": { "eth-json-rpc-middleware>eth-sig-util>ethereumjs-abi": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 6ba23b6c3f72..ea5ae2873364 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -682,11 +682,11 @@ "3box>ipfs>ipfs-unixfs-importer>async-iterator-batch": true, "3box>ipfs>ipfs-unixfs-importer>async-iterator-first": true, "3box>ipfs>ipfs-unixfs-importer>rabin-wasm": true, + "3box>ipfs>ipfs-unixfs-importer>superstruct": true, "3box>ipfs>ipld-dag-pb": true, "3box>ipfs>ipld-raw>multihashing-async": true, "3box>ipfs>multicodec": true, "3box>ipfs>multihashes": true, - "3box>ipfs>superstruct": true, "browserify>buffer": true, "madge>rc>deep-extend": true } @@ -841,11 +841,11 @@ "3box>ipfs>libp2p>libp2p-floodsub": true, "3box>ipfs>libp2p>libp2p-ping": true, "3box>ipfs>libp2p>libp2p-switch": true, + "3box>ipfs>libp2p>superstruct": true, "3box>ipfs>multiaddr": true, "3box>ipfs>peer-book": true, "3box>ipfs>peer-id": true, "3box>ipfs>peer-info": true, - "3box>ipfs>superstruct": true, "browserify>events": true, "browserify>insert-module-globals>is-buffer": true, "browserify>process": true, @@ -3229,20 +3229,13 @@ "setTimeout": true }, "packages": { - "@metamask/eth-json-rpc-infura>@metamask/utils": true, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true, + "eth-block-tracker>@metamask/utils": true, "eth-rpc-errors": true, "json-rpc-engine": true, "node-fetch": true } }, - "@metamask/eth-json-rpc-infura>@metamask/utils": { - "packages": { - "@metamask/eth-json-rpc-infura>@metamask/utils>superstruct": true, - "eslint>fast-deep-equal": true, - "nock>debug": true - } - }, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": { "globals": { "URL": true, @@ -3552,11 +3545,15 @@ } }, "@metamask/rpc-methods": { + "globals": { + "console.warn": true + }, "packages": { "@metamask/rpc-methods>@metamask/controllers": true, "@metamask/rpc-methods>@metamask/key-tree": true, "@metamask/snap-utils": true, - "@metamask/snap-utils>@metamask/utils": true, + "@metamask/snap-utils>superstruct": true, + "eth-block-tracker>@metamask/utils": true, "eth-rpc-errors": true } }, @@ -3869,7 +3866,7 @@ "@metamask/snap-controllers>readable-web-to-node-stream": true, "@metamask/snap-controllers>tar-stream": true, "@metamask/snap-utils": true, - "@metamask/snap-utils>@metamask/utils": true, + "eth-block-tracker>@metamask/utils": true, "eth-rpc-errors": true, "json-rpc-engine": true, "pump": true @@ -4034,8 +4031,13 @@ "removeEventListener": true }, "packages": { - "@metamask/snap-controllers>@metamask/post-message-stream>readable-stream": true, - "@metamask/snap-utils>@metamask/utils": true + "@metamask/snap-controllers>@metamask/post-message-stream>@metamask/utils": true, + "@metamask/snap-controllers>@metamask/post-message-stream>readable-stream": true + } + }, + "@metamask/snap-controllers>@metamask/post-message-stream>@metamask/utils": { + "packages": { + "eslint>fast-deep-equal": true } }, "@metamask/snap-controllers>@metamask/post-message-stream>readable-stream": { @@ -4259,20 +4261,17 @@ "@babel/core>@babel/types": true, "@metamask/snap-utils>ajv": true, "@metamask/snap-utils>rfdc": true, + "@metamask/snap-utils>superstruct": true, "browserify": true, "browserify>buffer": true, "browserify>crypto-browserify": true, "browserify>events": true, "browserify>path-browserify": true, "eslint>fast-deep-equal": true, + "eth-block-tracker>@metamask/utils": true, "semver": true } }, - "@metamask/snap-utils>@metamask/utils": { - "packages": { - "eslint>fast-deep-equal": true - } - }, "@metamask/snap-utils>rfdc": { "packages": { "browserify>buffer": true @@ -5314,9 +5313,13 @@ } }, "eth-block-tracker>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, "packages": { + "@metamask/snap-utils>superstruct": true, "eslint>fast-deep-equal": true, - "eth-block-tracker>@metamask/utils>superstruct": true, "nock>debug": true } }, @@ -5373,7 +5376,7 @@ }, "packages": { "browserify>browser-resolve": true, - "eth-json-rpc-middleware>@metamask/utils": true, + "eth-block-tracker>@metamask/utils": true, "eth-json-rpc-middleware>eth-sig-util": true, "eth-json-rpc-middleware>pify": true, "eth-rpc-errors": true, @@ -5383,13 +5386,6 @@ "vinyl>clone": true } }, - "eth-json-rpc-middleware>@metamask/utils": { - "packages": { - "eslint>fast-deep-equal": true, - "eth-json-rpc-middleware>@metamask/utils>superstruct": true, - "nock>debug": true - } - }, "eth-json-rpc-middleware>eth-sig-util": { "packages": { "eth-json-rpc-middleware>eth-sig-util>ethereumjs-abi": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 2e1e455bc59c..3f8260c5eafb 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -682,11 +682,11 @@ "3box>ipfs>ipfs-unixfs-importer>async-iterator-batch": true, "3box>ipfs>ipfs-unixfs-importer>async-iterator-first": true, "3box>ipfs>ipfs-unixfs-importer>rabin-wasm": true, + "3box>ipfs>ipfs-unixfs-importer>superstruct": true, "3box>ipfs>ipld-dag-pb": true, "3box>ipfs>ipld-raw>multihashing-async": true, "3box>ipfs>multicodec": true, "3box>ipfs>multihashes": true, - "3box>ipfs>superstruct": true, "browserify>buffer": true, "madge>rc>deep-extend": true } @@ -841,11 +841,11 @@ "3box>ipfs>libp2p>libp2p-floodsub": true, "3box>ipfs>libp2p>libp2p-ping": true, "3box>ipfs>libp2p>libp2p-switch": true, + "3box>ipfs>libp2p>superstruct": true, "3box>ipfs>multiaddr": true, "3box>ipfs>peer-book": true, "3box>ipfs>peer-id": true, "3box>ipfs>peer-info": true, - "3box>ipfs>superstruct": true, "browserify>events": true, "browserify>insert-module-globals>is-buffer": true, "browserify>process": true, @@ -3068,20 +3068,13 @@ "setTimeout": true }, "packages": { - "@metamask/eth-json-rpc-infura>@metamask/utils": true, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true, + "eth-block-tracker>@metamask/utils": true, "eth-rpc-errors": true, "json-rpc-engine": true, "node-fetch": true } }, - "@metamask/eth-json-rpc-infura>@metamask/utils": { - "packages": { - "@metamask/eth-json-rpc-infura>@metamask/utils>superstruct": true, - "eslint>fast-deep-equal": true, - "nock>debug": true - } - }, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": { "globals": { "URL": true, @@ -4494,9 +4487,13 @@ } }, "eth-block-tracker>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, "packages": { + "@metamask/snap-utils>superstruct": true, "eslint>fast-deep-equal": true, - "eth-block-tracker>@metamask/utils>superstruct": true, "nock>debug": true } }, @@ -4553,7 +4550,7 @@ }, "packages": { "browserify>browser-resolve": true, - "eth-json-rpc-middleware>@metamask/utils": true, + "eth-block-tracker>@metamask/utils": true, "eth-json-rpc-middleware>eth-sig-util": true, "eth-json-rpc-middleware>pify": true, "eth-rpc-errors": true, @@ -4563,13 +4560,6 @@ "vinyl>clone": true } }, - "eth-json-rpc-middleware>@metamask/utils": { - "packages": { - "eslint>fast-deep-equal": true, - "eth-json-rpc-middleware>@metamask/utils>superstruct": true, - "nock>debug": true - } - }, "eth-json-rpc-middleware>eth-sig-util": { "packages": { "eth-json-rpc-middleware>eth-sig-util>ethereumjs-abi": true, diff --git a/package.json b/package.json index 4ba4375ac381..6be08da738d6 100644 --- a/package.json +++ b/package.json @@ -135,11 +135,11 @@ "@metamask/obs-store": "^5.0.0", "@metamask/post-message-stream": "^4.0.0", "@metamask/providers": "^9.0.0", - "@metamask/rpc-methods": "^0.21.0", + "@metamask/rpc-methods": "^0.22.0", "@metamask/slip44": "^2.1.0", "@metamask/smart-transactions-controller": "^2.3.2", - "@metamask/snap-controllers": "^0.21.0", - "@metamask/snap-utils": "^0.21.0", + "@metamask/snap-controllers": "^0.22.0", + "@metamask/snap-utils": "^0.22.0", "@ngraveio/bc-ur": "^1.1.6", "@popperjs/core": "^2.4.0", "@reduxjs/toolkit": "^1.6.2", diff --git a/shared/constants/permissions.test.js b/shared/constants/permissions.test.js index 3637fed5818a..433d6629c3b5 100644 --- a/shared/constants/permissions.test.js +++ b/shared/constants/permissions.test.js @@ -2,6 +2,7 @@ import { endowmentPermissionBuilders } from '@metamask/snap-controllers'; import { restrictedMethodPermissionBuilders } from '@metamask/rpc-methods'; import { EndowmentPermissions, + ExcludedSnapEndowments, ExcludedSnapPermissions, RestrictedMethods, } from './permissions'; @@ -9,7 +10,9 @@ import { describe('EndowmentPermissions', () => { it('has the expected permission keys', () => { expect(Object.keys(EndowmentPermissions).sort()).toStrictEqual( - Object.keys(endowmentPermissionBuilders).sort(), + Object.keys(endowmentPermissionBuilders) + .filter((targetKey) => !ExcludedSnapEndowments.has(targetKey)) + .sort(), ); }); }); diff --git a/shared/constants/permissions.ts b/shared/constants/permissions.ts index ced11127fe44..49c281f1355e 100644 --- a/shared/constants/permissions.ts +++ b/shared/constants/permissions.ts @@ -27,5 +27,6 @@ export const EndowmentPermissions = Object.freeze({ } as const); // Methods / permissions in external packages that we are temporarily excluding. -export const ExcludedSnapPermissions = new Set([]); +export const ExcludedSnapPermissions = new Set(['snap_dialog']); +export const ExcludedSnapEndowments = new Set(['endowment:keyring']); ///: END:ONLY_INCLUDE_IN diff --git a/ui/pages/confirmation/templates/flask/snap-confirm/snap-confirm.js b/ui/pages/confirmation/templates/flask/snap-confirm/snap-confirm.js index a5d278450a57..120bea07cdd2 100644 --- a/ui/pages/confirmation/templates/flask/snap-confirm/snap-confirm.js +++ b/ui/pages/confirmation/templates/flask/snap-confirm/snap-confirm.js @@ -5,14 +5,14 @@ import { import ZENDESK_URLS from '../../../../../helpers/constants/zendesk-url'; function getValues(pendingApproval, t, actions) { - const { prompt, description, textAreaContent } = pendingApproval.requestData; + const { title, description, textAreaContent } = pendingApproval.requestData; return { content: [ { element: 'Typography', key: 'title', - children: prompt, + children: title, props: { variant: TYPOGRAPHY.H3, align: 'center', diff --git a/yarn.lock b/yarn.lock index 7403c438b107..e2271e8d68a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3317,17 +3317,17 @@ resolved "https://registry.yarnpkg.com/@metamask/etherscan-link/-/etherscan-link-2.2.0.tgz#76314d0c1405a0669fc4a0a19e0877bd3d0c389f" integrity sha512-xUgehvgU+ZbzeJ44m4sUtsyf6Dwou+SlYhiKfi6lkRcbWh6Jl3TCi0YM9C7XWgxfnLSdQBO1ndvcp0kslKgMsA== -"@metamask/execution-environments@^0.21.0": - version "0.21.0" - resolved "https://registry.yarnpkg.com/@metamask/execution-environments/-/execution-environments-0.21.0.tgz#40d5c63215fb98a43f9d7b3b31c371dbed93adba" - integrity sha512-KnQ07SRcht/jpHa4KLHftI034GPZXzz2I1RsWk/0OMxQ3ECGJwDroH92pXNRy0+HTdz31XWhMzdc1GW5rR2CzA== +"@metamask/execution-environments@^0.22.0": + version "0.22.0" + resolved "https://registry.yarnpkg.com/@metamask/execution-environments/-/execution-environments-0.22.0.tgz#2dd67add467e64fc6e992cb36461f20959ed87fd" + integrity sha512-mb5O3HX5Nrt0urAPWohiyB9w465Qk12tF1hXz+vjwFZe4LAbTHza7XsbvTzAy1XD99JjhtLMi+IwaHp8GELcDg== dependencies: "@metamask/object-multiplex" "^1.2.0" "@metamask/post-message-stream" "^6.0.0" "@metamask/providers" "^9.0.0" - "@metamask/snap-types" "^0.21.0" - "@metamask/snap-utils" "^0.21.0" - "@metamask/utils" "^2.0.0" + "@metamask/snap-types" "^0.22.0" + "@metamask/snap-utils" "^0.22.0" + "@metamask/utils" "^3.1.0" eth-rpc-errors "^4.0.3" pump "^3.0.0" ses "^0.15.15" @@ -3449,17 +3449,18 @@ pump "^3.0.0" webextension-polyfill-ts "^0.25.0" -"@metamask/rpc-methods@^0.21.0": - version "0.21.0" - resolved "https://registry.yarnpkg.com/@metamask/rpc-methods/-/rpc-methods-0.21.0.tgz#7d00029aeaa606d5780fb2e7c01069e714822ae4" - integrity sha512-CXYBzIf6hYH8bkqkvGqFHFmsVdjYGznkgw96NpGosQS4vns07wrvBluA45WehAqgHDZHpom1ffQ8r11PksM86Q== +"@metamask/rpc-methods@^0.22.0": + version "0.22.0" + resolved "https://registry.yarnpkg.com/@metamask/rpc-methods/-/rpc-methods-0.22.0.tgz#17ee8db33deba5152d531123139fd3ea651e49ef" + integrity sha512-FCVbf68zgHHThG2OAOp9u7iBO1hjIMjo8S85bXsGtStUp9KjiGxnuQhyNK7b/Ny+WuHI+GP26abXRIyS2ampfA== dependencies: "@metamask/controllers" "^31.0.0" "@metamask/key-tree" "^5.0.2" - "@metamask/snap-utils" "^0.21.0" + "@metamask/snap-utils" "^0.22.0" "@metamask/types" "^1.1.0" - "@metamask/utils" "^2.1.0" + "@metamask/utils" "^3.1.0" eth-rpc-errors "^4.0.2" + superstruct "^0.16.5" "@metamask/safe-event-emitter@^2.0.0": version "2.0.0" @@ -3486,19 +3487,20 @@ isomorphic-fetch "^3.0.0" lodash "^4.17.21" -"@metamask/snap-controllers@^0.21.0": - version "0.21.0" - resolved "https://registry.yarnpkg.com/@metamask/snap-controllers/-/snap-controllers-0.21.0.tgz#5fdc2f350c8739b070f1bfdbc9c7ef7409af234d" - integrity sha512-WZyfB+mQMifB7a5tf5WEVrWnLdoSMG/sXL6YQnItC/96SUX//c9IW+iNB6ZZfiP5lJFwafN5hjOExWH3O/fwbw== +"@metamask/snap-controllers@^0.22.0": + version "0.22.0" + resolved "https://registry.yarnpkg.com/@metamask/snap-controllers/-/snap-controllers-0.22.0.tgz#bb1dfb7551cfca74b17addad2390ad80a6df8b7a" + integrity sha512-k7TgYyzZna54ns3o9GjnLiHJDT3xvkG4i+zSEJSMPzqAy5Su5p2yMiTe/awEwTVFBMsC9xtX9owc0lArkk8NZw== dependencies: "@metamask/browser-passworder" "^3.0.0" "@metamask/controllers" "^31.0.0" - "@metamask/execution-environments" "^0.21.0" + "@metamask/execution-environments" "^0.22.0" "@metamask/object-multiplex" "^1.1.0" "@metamask/post-message-stream" "^6.0.0" - "@metamask/rpc-methods" "^0.21.0" - "@metamask/snap-utils" "^0.21.0" - "@metamask/utils" "^2.0.0" + "@metamask/rpc-methods" "^0.22.0" + "@metamask/snap-types" "^0.22.0" + "@metamask/snap-utils" "^0.22.0" + "@metamask/utils" "^3.1.0" "@xstate/fsm" "^2.0.0" concat-stream "^2.0.0" eth-rpc-errors "^4.0.2" @@ -3511,29 +3513,30 @@ readable-web-to-node-stream "^3.0.2" tar-stream "^2.2.0" -"@metamask/snap-types@^0.21.0": - version "0.21.0" - resolved "https://registry.yarnpkg.com/@metamask/snap-types/-/snap-types-0.21.0.tgz#51380240a97a6ef492dca9d5bcb2d7c6f6c8a023" - integrity sha512-wyamdpiZqVfrHjAysnplVQexEisH8b00XTv6F8kTyKd4pbRTBswmOOc1DhBbi2+7Fw2J5a7pdLb9+/MRMwnztg== +"@metamask/snap-types@^0.22.0": + version "0.22.0" + resolved "https://registry.yarnpkg.com/@metamask/snap-types/-/snap-types-0.22.0.tgz#4d74e34eea69a7afe0ad9a4d54be83cf5391bf9e" + integrity sha512-XwJNk+Qbtr7xjuh1Iz7wqybp+xB3H6uRJjlOqtgIoOui9V2zfL/At/FzHMMvaLeUsWJhOVSJP5qmEzCYaOEvmQ== dependencies: "@metamask/providers" "^9.0.0" - "@metamask/snap-utils" "^0.21.0" + "@metamask/snap-utils" "^0.22.0" "@metamask/types" "^1.1.0" -"@metamask/snap-utils@^0.21.0": - version "0.21.0" - resolved "https://registry.yarnpkg.com/@metamask/snap-utils/-/snap-utils-0.21.0.tgz#7ed5df1d0c25f2660ce36dcc436f3608d72e92d5" - integrity sha512-bfGvCIZd1zfuRUFN68F0HrIHfsCmoh/j6/Sm5sj6v7mIGyERbgpu0mYEwKIRjuCtV5GkGimXU6H2Tof+ZWrLtQ== +"@metamask/snap-utils@^0.22.0": + version "0.22.0" + resolved "https://registry.yarnpkg.com/@metamask/snap-utils/-/snap-utils-0.22.0.tgz#1815eecfc8a388a4ae6744664ff28f58404730ee" + integrity sha512-mwe72I/sVMVogNU+gxUU1P2Kos4S/4lEX1MUz7Hr79jfYzTgwTfxz/gaMubjD6CF2q0ZvF5JQr6OBk6ZRLHhCw== dependencies: "@babel/core" "^7.18.6" - "@metamask/snap-types" "^0.21.0" - "@metamask/utils" "^2.0.0" + "@metamask/snap-types" "^0.22.0" + "@metamask/utils" "^3.1.0" ajv "^8.11.0" eth-rpc-errors "^4.0.3" fast-deep-equal "^3.1.3" rfdc "^1.3.0" semver "^7.3.7" ses "^0.15.17" + superstruct "^0.16.5" "@metamask/test-dapp@^5.2.1": version "5.2.1" @@ -3545,22 +3548,22 @@ resolved "https://registry.yarnpkg.com/@metamask/types/-/types-1.1.0.tgz#9bd14b33427932833c50c9187298804a18c2e025" integrity sha512-EEV/GjlYkOSfSPnYXfOosxa3TqYtIW3fhg6jdw+cok/OhMgNn4wCfbENFqjytrHMU2f7ZKtBAvtiP5V8H44sSw== -"@metamask/utils@^2.0.0", "@metamask/utils@^2.1.0": +"@metamask/utils@^2.0.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-2.1.0.tgz#a65eaa0932b863383844ec323e05e293d8e718ab" integrity sha512-4PHdo5B1ifpw6GbsdlDpp8oqA++rddSmt2pWBHtIGGL2tQMvmfHdaDDSns4JP9iC+AbMogVcUpv5Vt8ow1zsRA== dependencies: fast-deep-equal "^3.1.3" -"@metamask/utils@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-3.0.1.tgz#53ed2b9cbbd12b18c1db6929728446633d6a74c4" - integrity sha512-FDWQ+MeeWQh0b/w2D50+oVPrRqUIvawDlPia+EH9NCOFN0Ty3KkzkQXfO6FgHKMyR4aWuS4SBOrhWFRW8km6lQ== +"@metamask/utils@^3.0.1", "@metamask/utils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-3.1.0.tgz#ecfabe08e807bfcfb9ed1d7e727779a9382bee2c" + integrity sha512-zBGKgaqdKO9z2CoBSDzeE5KJUr5pM72YsumyUiklSyqMg/xL9vu7Z+E/pkRtwPmyi2YWXvq1rWfjugTt2+38nA== dependencies: "@types/debug" "^4.1.7" debug "^4.3.4" fast-deep-equal "^3.1.3" - superstruct "^0.16.0" + superstruct "^0.16.5" "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" @@ -26687,10 +26690,10 @@ superagent@^3.8.1: qs "^6.5.1" readable-stream "^2.3.5" -superstruct@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.16.0.tgz#9af5e059acd08e774789ad8880962427ef68dace" - integrity sha512-IDQtwnnlaan1NhuHqyD/U11lROYvCQ79JyfwlFU9xEVHzqV/Ys/RrwmHPCG0CVH/1g0BuodEjH1msxK2UHxehA== +superstruct@^0.16.5: + version "0.16.5" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.16.5.tgz#7b7e1f1f8bf6ab141c660e501ac57026e42c09c0" + integrity sha512-GBa1VPdCUDAIrsoMVy2lzE/hKQnieUlc1JVoVzJ2YLx47SoPY4AqF85Ht1bPg5r+8I0v54GbaRdNTnYQ0p+T+Q== superstruct@^0.6.0, superstruct@~0.6.0, superstruct@~0.6.1: version "0.6.1"