From 18e56f18ca84a2481fa8fab02bc5d2f34b405860 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 21 Sep 2023 11:18:06 +0200 Subject: [PATCH 1/9] Remove -flask snaps packages --- .depcheckrc.yml | 8 -- development/build/scripts.js | 20 ---- package.json | 5 - yarn.lock | 172 ++--------------------------------- 4 files changed, 6 insertions(+), 199 deletions(-) diff --git a/.depcheckrc.yml b/.depcheckrc.yml index 187fd0b1eafc..972b13b06e8a 100644 --- a/.depcheckrc.yml +++ b/.depcheckrc.yml @@ -10,14 +10,6 @@ ignores: - '@fortawesome/fontawesome-free' - 'punycode' - # - # snaps flask deps - # - - '@metamask/rpc-methods-flask' - - '@metamask/snaps-controllers-flask' - - '@metamask/snaps-ui-flask' - - '@metamask/snaps-utils-flask' - # # dev deps # diff --git a/development/build/scripts.js b/development/build/scripts.js index 839dad7ed407..fa50a925c09f 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -27,7 +27,6 @@ const Sqrl = require('squirrelly'); const lavapack = require('@lavamoat/lavapack'); const lavamoatBrowserify = require('lavamoat-browserify'); const terser = require('terser'); -const moduleResolver = require('babel-plugin-module-resolver'); const bifyModuleGroups = require('bify-module-groups'); @@ -931,9 +930,6 @@ function setupBundlerDefaults( const { bundlerOpts } = buildConfiguration; const extensions = ['.js', '.ts', '.tsx']; - const isSnapsFlask = - features.active.has('snaps') && features.active.has('build-flask'); - Object.assign(bundlerOpts, { // Source transforms transform: [ @@ -945,22 +941,6 @@ function setupBundlerDefaults( // Run TypeScript files through Babel { extensions, - plugins: isSnapsFlask - ? [ - [ - moduleResolver, - { - alias: { - '@metamask/snaps-controllers': - '@metamask/snaps-controllers-flask', - '@metamask/snaps-ui': '@metamask/snaps-ui-flask', - '@metamask/snaps-utils': '@metamask/snaps-utils-flask', - '@metamask/rpc-methods': '@metamask/rpc-methods-flask', - }, - }, - ], - ] - : [], }, ], // Inline `fs.readFileSync` files diff --git a/package.json b/package.json index 3495c0719a06..f798a5b736f1 100644 --- a/package.json +++ b/package.json @@ -270,7 +270,6 @@ "@metamask/providers": "^11.1.0", "@metamask/rate-limit-controller": "^3.0.0", "@metamask/rpc-methods": "^1.0.2", - "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.38.3-flask.1", "@metamask/safe-event-emitter": "^2.0.0", "@metamask/scure-bip39": "^2.0.3", "@metamask/selected-network-controller": "^1.0.0", @@ -278,11 +277,8 @@ "@metamask/slip44": "^3.0.0", "@metamask/smart-transactions-controller": "^4.0.0", "@metamask/snaps-controllers": "^1.0.2", - "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.39.0-flask.1", "@metamask/snaps-ui": "^1.0.2", - "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.37.5-flask.1", "@metamask/snaps-utils": "^1.0.2", - "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.38.4-flask.1", "@metamask/subject-metadata-controller": "^2.0.0", "@metamask/utils": "^5.0.0", "@ngraveio/bc-ur": "^1.1.6", @@ -445,7 +441,6 @@ "@typescript-eslint/parser": "^5.30.7", "@whitespace/storybook-addon-html": "^5.1.6", "addons-linter": "^5.2.0", - "babel-plugin-module-resolver": "^5.0.0", "babelify": "^10.0.0", "bify-module-groups": "^2.0.0", "brfs": "^2.0.2", diff --git a/yarn.lock b/yarn.lock index 7c407e6c4bb8..3577b89a07cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4595,16 +4595,6 @@ __metadata: languageName: node linkType: hard -"@metamask/post-message-stream@npm:^7.0.0": - version: 7.0.0 - resolution: "@metamask/post-message-stream@npm:7.0.0" - dependencies: - "@metamask/utils": "npm:^5.0.0" - readable-stream: "npm:3.6.2" - checksum: 626f12b28a495aeaf64fdf5ebd6175d8c4685241d241defc3e1e2b0c638fcfd3c901553aa43820d48de4cd19cf6f73c0c3d34f8a0bcb831f16f6d52d7458f79e - languageName: node - linkType: hard - "@metamask/ppom-validator@npm:^0.5.0": version: 0.5.0 resolution: "@metamask/ppom-validator@npm:0.5.0" @@ -4718,23 +4708,6 @@ __metadata: languageName: node linkType: hard -"@metamask/rpc-methods-flask@npm:@metamask/rpc-methods@0.38.3-flask.1, @metamask/rpc-methods@npm:^0.38.3-flask.1": - version: 0.38.3-flask.1 - resolution: "@metamask/rpc-methods@npm:0.38.3-flask.1" - dependencies: - "@metamask/key-tree": "npm:^9.0.0" - "@metamask/permission-controller": "npm:^4.1.0" - "@metamask/snaps-ui": "npm:^0.37.5-flask.1" - "@metamask/snaps-utils": "npm:^0.38.4-flask.1" - "@metamask/types": "npm:^1.1.0" - "@metamask/utils": "npm:^8.1.0" - "@noble/hashes": "npm:^1.3.1" - eth-rpc-errors: "npm:^4.0.3" - superstruct: "npm:^1.0.3" - checksum: 859b279a9b89a66daeffbf7be67d83582d58b71ac4afec54c61059a5c0cd994e176cc9b4df51ea98f645981c526353ab2f0f93bc3c1e699b445a35ecb0f7d65f - languageName: node - linkType: hard - "@metamask/rpc-methods@npm:^0.38.1-flask.1": version: 0.38.1-flask.1 resolution: "@metamask/rpc-methods@npm:0.38.1-flask.1" @@ -4870,34 +4843,6 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-controllers-flask@npm:@metamask/snaps-controllers@0.39.0-flask.1": - version: 0.39.0-flask.1 - resolution: "@metamask/snaps-controllers@npm:0.39.0-flask.1" - dependencies: - "@metamask/approval-controller": "npm:^3.5.0" - "@metamask/base-controller": "npm:^3.2.0" - "@metamask/object-multiplex": "npm:^1.2.0" - "@metamask/permission-controller": "npm:^4.1.0" - "@metamask/post-message-stream": "npm:^7.0.0" - "@metamask/rpc-methods": "npm:^0.38.3-flask.1" - "@metamask/snaps-execution-environments": "npm:^0.39.0-flask.1" - "@metamask/snaps-registry": "npm:^2.0.0" - "@metamask/snaps-utils": "npm:^0.38.4-flask.1" - "@metamask/utils": "npm:^8.1.0" - "@xstate/fsm": "npm:^2.0.0" - concat-stream: "npm:^2.0.0" - eth-rpc-errors: "npm:^4.0.3" - gunzip-maybe: "npm:^1.4.2" - immer: "npm:^9.0.6" - json-rpc-engine: "npm:^6.1.0" - json-rpc-middleware-stream: "npm:^4.2.0" - nanoid: "npm:^3.1.31" - readable-web-to-node-stream: "npm:^3.0.2" - tar-stream: "npm:^2.2.0" - checksum: 6a4e71fafedd9cb0ef89719d2772d0511473bd6fc474534d36fd09a024a5c1914c69bc61d8db1ab990483abd2d6ebcceef26bb7f7fb73e63ef54e3e81d2aa174 - languageName: node - linkType: hard - "@metamask/snaps-controllers@npm:^0.38.2-flask.1": version: 0.38.2-flask.1 resolution: "@metamask/snaps-controllers@npm:0.38.2-flask.1" @@ -4976,24 +4921,6 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-execution-environments@npm:^0.39.0-flask.1": - version: 0.39.0-flask.1 - resolution: "@metamask/snaps-execution-environments@npm:0.39.0-flask.1" - dependencies: - "@metamask/object-multiplex": "npm:^1.2.0" - "@metamask/post-message-stream": "npm:^7.0.0" - "@metamask/providers": "npm:^11.1.1" - "@metamask/rpc-methods": "npm:^0.38.3-flask.1" - "@metamask/snaps-utils": "npm:^0.38.4-flask.1" - "@metamask/utils": "npm:^8.1.0" - eth-rpc-errors: "npm:^4.0.3" - json-rpc-engine: "npm:^6.1.0" - nanoid: "npm:^3.1.31" - superstruct: "npm:^1.0.3" - checksum: 80aa0fcb299337d1e1e62fcff195123e0b23096d7895818669ba0ab0eb2c816611603665d4463c44b41ae93a03bbc6fd570ffbe2b986b560f4befd50390f72cc - languageName: node - linkType: hard - "@metamask/snaps-execution-environments@npm:^1.0.2": version: 1.0.2 resolution: "@metamask/snaps-execution-environments@npm:1.0.2" @@ -5025,27 +4952,6 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-registry@npm:^2.0.0": - version: 2.0.0 - resolution: "@metamask/snaps-registry@npm:2.0.0" - dependencies: - "@metamask/utils": "npm:^8.1.0" - "@noble/secp256k1": "npm:^1.7.1" - superstruct: "npm:^1.0.3" - checksum: 99f8777708b6db3b2c12b66bd3d85f44c9e20ec78f04bd814a50c414fdb936a073d590926a494623691dd552592299eb1c3e8bb66382da46ec87c55694f46534 - languageName: node - linkType: hard - -"@metamask/snaps-ui-flask@npm:@metamask/snaps-ui@0.37.5-flask.1, @metamask/snaps-ui@npm:^0.37.5-flask.1": - version: 0.37.5-flask.1 - resolution: "@metamask/snaps-ui@npm:0.37.5-flask.1" - dependencies: - "@metamask/utils": "npm:^8.1.0" - superstruct: "npm:^1.0.3" - checksum: a0f665df2d758a6d43c556a4b921a930b9e0cbac21195829d4d187428d071b0c53b8c5b0288029074b562272383a931407d80c8a7af5f9792bec1d5354f6d4ad - languageName: node - linkType: hard - "@metamask/snaps-ui@npm:^0.37.4-flask.1": version: 0.37.4-flask.1 resolution: "@metamask/snaps-ui@npm:0.37.4-flask.1" @@ -5066,35 +4972,6 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-utils-flask@npm:@metamask/snaps-utils@0.38.4-flask.1, @metamask/snaps-utils@npm:^0.38.4-flask.1": - version: 0.38.4-flask.1 - resolution: "@metamask/snaps-utils@npm:0.38.4-flask.1" - dependencies: - "@babel/core": "npm:^7.20.12" - "@babel/types": "npm:^7.18.7" - "@metamask/base-controller": "npm:^3.2.0" - "@metamask/key-tree": "npm:^9.0.0" - "@metamask/permission-controller": "npm:^4.1.0" - "@metamask/snaps-registry": "npm:^2.0.0" - "@metamask/snaps-ui": "npm:^0.37.5-flask.1" - "@metamask/utils": "npm:^8.1.0" - "@noble/hashes": "npm:^1.3.1" - "@scure/base": "npm:^1.1.1" - chalk: "npm:^4.1.2" - cron-parser: "npm:^4.5.0" - eth-rpc-errors: "npm:^4.0.3" - fast-deep-equal: "npm:^3.1.3" - fast-json-stable-stringify: "npm:^2.1.0" - is-svg: "npm:^4.4.0" - rfdc: "npm:^1.3.0" - semver: "npm:^7.5.4" - ses: "npm:^0.18.7" - superstruct: "npm:^1.0.3" - validate-npm-package-name: "npm:^5.0.0" - checksum: fb1fb14ee3766fe0e0834719ea9ff9bcd8940c538b206fdc8ca9afdbb06515ddd178a20359790781ed6fe86fc3bc5873b67adffb135baf6713ad1db8b3c65581 - languageName: node - linkType: hard - "@metamask/snaps-utils@npm:^0.38.2-flask.1": version: 0.38.2-flask.1 resolution: "@metamask/snaps-utils@npm:0.38.2-flask.1" @@ -10548,19 +10425,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-module-resolver@npm:^5.0.0": - version: 5.0.0 - resolution: "babel-plugin-module-resolver@npm:5.0.0" - dependencies: - find-babel-config: "npm:^2.0.0" - glob: "npm:^8.0.3" - pkg-up: "npm:^3.1.0" - reselect: "npm:^4.1.7" - resolve: "npm:^1.22.1" - checksum: 13924d6ec9958405b2ac1a471639f75a7e486f643a6a50363b26dca7b66abd2cf1d9fe301c4e7b50c817e37e782fa06c209d958a4e0570c9ded36e0b8b6c2e48 - languageName: node - linkType: hard - "babel-plugin-named-exports-order@npm:^0.0.2": version: 0.0.2 resolution: "babel-plugin-named-exports-order@npm:0.0.2" @@ -17295,16 +17159,6 @@ __metadata: languageName: node linkType: hard -"find-babel-config@npm:^2.0.0": - version: 2.0.0 - resolution: "find-babel-config@npm:2.0.0" - dependencies: - json5: "npm:^2.1.1" - path-exists: "npm:^4.0.0" - checksum: 06e50e920a2b35ff1c90fe33382e48aae70db4bdb6bbb58a4fdb5e687b50074e8b791a8ef2d9bb4b582c8d624d34b0cc763613c7cb585eeb352cd4521976f35a - languageName: node - linkType: hard - "find-cache-dir@npm:^2.0.0": version: 2.1.0 resolution: "find-cache-dir@npm:2.1.0" @@ -18422,7 +18276,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.1, glob@npm:^8.0.3, glob@npm:^8.1.0": +"glob@npm:^8.0.1, glob@npm:^8.1.0": version: 8.1.0 resolution: "glob@npm:8.1.0" dependencies: @@ -22421,7 +22275,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.1.1, json5@npm:^2.1.2, json5@npm:^2.1.3, json5@npm:^2.2.2": +"json5@npm:^2.1.2, json5@npm:^2.1.3, json5@npm:^2.2.2": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -24241,7 +24095,6 @@ __metadata: "@metamask/providers": "npm:^11.1.0" "@metamask/rate-limit-controller": "npm:^3.0.0" "@metamask/rpc-methods": "npm:^1.0.2" - "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.38.3-flask.1" "@metamask/safe-event-emitter": "npm:^2.0.0" "@metamask/scure-bip39": "npm:^2.0.3" "@metamask/selected-network-controller": "npm:^1.0.0" @@ -24249,11 +24102,8 @@ __metadata: "@metamask/slip44": "npm:^3.0.0" "@metamask/smart-transactions-controller": "npm:^4.0.0" "@metamask/snaps-controllers": "npm:^1.0.2" - "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.39.0-flask.1" "@metamask/snaps-ui": "npm:^1.0.2" - "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.37.5-flask.1" "@metamask/snaps-utils": "npm:^1.0.2" - "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.38.4-flask.1" "@metamask/subject-metadata-controller": "npm:^2.0.0" "@metamask/test-dapp": "npm:^7.1.0" "@metamask/utils": "npm:^5.0.0" @@ -24319,7 +24169,6 @@ __metadata: "@zxing/library": "npm:0.20.0" addons-linter: "npm:^5.2.0" await-semaphore: "npm:^0.1.1" - babel-plugin-module-resolver: "npm:^5.0.0" babelify: "npm:^10.0.0" base32-encode: "npm:^1.2.0" base64-js: "npm:^1.5.1" @@ -27485,15 +27334,6 @@ __metadata: languageName: node linkType: hard -"pkg-up@npm:^3.1.0": - version: 3.1.0 - resolution: "pkg-up@npm:3.1.0" - dependencies: - find-up: "npm:^3.0.0" - checksum: 5bac346b7c7c903613c057ae3ab722f320716199d753f4a7d053d38f2b5955460f3e6ab73b4762c62fd3e947f58e04f1343e92089e7bb6091c90877406fcd8c8 - languageName: node - linkType: hard - "playwright-core@npm:1.29.2, playwright-core@npm:>=1.2.0": version: 1.29.2 resolution: "playwright-core@npm:1.29.2" @@ -29228,7 +29068,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:2 || 3, readable-stream@npm:3, readable-stream@npm:3.6.2, readable-stream@npm:^3.0.2, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": +"readable-stream@npm:2 || 3, readable-stream@npm:3, readable-stream@npm:^3.0.2, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -29925,7 +29765,7 @@ __metadata: languageName: node linkType: hard -"reselect@npm:^4.0.0, reselect@npm:^4.1.7": +"reselect@npm:^4.0.0": version: 4.1.8 resolution: "reselect@npm:4.1.8" checksum: 199984d9872f71cd207f4aa6e6fd2bd48d95154f7aa9b3aee3398335f39f5491059e732f28c12e9031d5d434adab2c458dc8af5afb6564d0ad37e1644445e09c @@ -30044,7 +29884,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.4, resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.11.1, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.18.1, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.0, resolve@npm:^1.22.1, resolve@npm:^1.22.3, resolve@npm:^1.4.0": +"resolve@npm:^1.1.4, resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.11.1, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.18.1, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.0, resolve@npm:^1.22.3, resolve@npm:^1.4.0": version: 1.22.3 resolution: "resolve@npm:1.22.3" dependencies: @@ -30070,7 +29910,7 @@ __metadata: languageName: node linkType: hard -? "resolve@patch:resolve@npm%3A^1.1.4#optional!builtin, resolve@patch:resolve@npm%3A^1.1.5#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.11.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.18.1#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.21.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.4.0#optional!builtin" +? "resolve@patch:resolve@npm%3A^1.1.4#optional!builtin, resolve@patch:resolve@npm%3A^1.1.5#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.11.1#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.18.1#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.21.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.4.0#optional!builtin" : version: 1.22.3 resolution: "resolve@patch:resolve@npm%3A1.22.3#optional!builtin::version=1.22.3&hash=c3c19d" From 63523bcf047451c6c19ddc823426b01a7b0ffcf9 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 21 Sep 2023 14:55:06 +0200 Subject: [PATCH 2/9] Bump snaps packages --- builds.yml | 6 +-- package.json | 6 +-- yarn.lock | 141 ++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 113 insertions(+), 40 deletions(-) diff --git a/builds.yml b/builds.yml index de476c77b15c..f62380e8e730 100644 --- a/builds.yml +++ b/builds.yml @@ -25,7 +25,7 @@ buildTypes: - SEGMENT_WRITE_KEY_REF: SEGMENT_PROD_WRITE_KEY - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/1.0.2/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/2.0.0/index.html # Main build uses the default browser manifest manifestOverrides: false @@ -58,7 +58,7 @@ buildTypes: - SEGMENT_FLASK_WRITE_KEY - ALLOW_LOCAL_SNAPS: true - REQUIRE_SNAPS_ALLOWLIST: false - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/0.39.0-flask.1/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/2.0.0/index.html - SUPPORT_LINK: https://metamask-flask.zendesk.com/hc - SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new - INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID @@ -77,7 +77,7 @@ buildTypes: - SEGMENT_FLASK_WRITE_KEY - ALLOW_LOCAL_SNAPS: true - REQUIRE_SNAPS_ALLOWLIST: false - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/0.39.0-flask.1/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/2.0.0/index.html - SUPPORT_LINK: https://metamask-flask.zendesk.com/hc - SUPPORT_REQUEST_LINK: https://metamask-flask.zendesk.com/hc/en-us/requests/new - INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID diff --git a/package.json b/package.json index f798a5b736f1..903c545ac67e 100644 --- a/package.json +++ b/package.json @@ -276,9 +276,9 @@ "@metamask/signature-controller": "^5.3.0", "@metamask/slip44": "^3.0.0", "@metamask/smart-transactions-controller": "^4.0.0", - "@metamask/snaps-controllers": "^1.0.2", - "@metamask/snaps-ui": "^1.0.2", - "@metamask/snaps-utils": "^1.0.2", + "@metamask/snaps-controllers": "^2.0.0", + "@metamask/snaps-ui": "^2.0.0", + "@metamask/snaps-utils": "^2.0.0", "@metamask/subject-metadata-controller": "^2.0.0", "@metamask/utils": "^5.0.0", "@ngraveio/bc-ur": "^1.1.6", diff --git a/yarn.lock b/yarn.lock index 3577b89a07cc..d91aa58bb017 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4585,7 +4585,7 @@ __metadata: languageName: node linkType: hard -"@metamask/post-message-stream@npm:^6.0.0, @metamask/post-message-stream@npm:^6.1.1, @metamask/post-message-stream@npm:^6.1.2, @metamask/post-message-stream@npm:^6.2.0": +"@metamask/post-message-stream@npm:^6.0.0, @metamask/post-message-stream@npm:^6.1.2, @metamask/post-message-stream@npm:^6.2.0": version: 6.2.0 resolution: "@metamask/post-message-stream@npm:6.2.0" dependencies: @@ -4595,6 +4595,16 @@ __metadata: languageName: node linkType: hard +"@metamask/post-message-stream@npm:^7.0.0": + version: 7.0.0 + resolution: "@metamask/post-message-stream@npm:7.0.0" + dependencies: + "@metamask/utils": "npm:^5.0.0" + readable-stream: "npm:3.6.2" + checksum: 626f12b28a495aeaf64fdf5ebd6175d8c4685241d241defc3e1e2b0c638fcfd3c901553aa43820d48de4cd19cf6f73c0c3d34f8a0bcb831f16f6d52d7458f79e + languageName: node + linkType: hard + "@metamask/ppom-validator@npm:^0.5.0": version: 0.5.0 resolution: "@metamask/ppom-validator@npm:0.5.0" @@ -4618,7 +4628,7 @@ __metadata: languageName: node linkType: hard -"@metamask/providers@npm:^10.2.0, @metamask/providers@npm:^10.2.1": +"@metamask/providers@npm:^10.2.1": version: 10.2.1 resolution: "@metamask/providers@npm:10.2.1" dependencies: @@ -4744,6 +4754,23 @@ __metadata: languageName: node linkType: hard +"@metamask/rpc-methods@npm:^2.0.0": + version: 2.0.0 + resolution: "@metamask/rpc-methods@npm:2.0.0" + dependencies: + "@metamask/key-tree": "npm:^9.0.0" + "@metamask/permission-controller": "npm:^4.1.0" + "@metamask/snaps-ui": "npm:^2.0.0" + "@metamask/snaps-utils": "npm:^2.0.0" + "@metamask/types": "npm:^1.1.0" + "@metamask/utils": "npm:^8.1.0" + "@noble/hashes": "npm:^1.3.1" + eth-rpc-errors: "npm:^4.0.3" + superstruct: "npm:^1.0.3" + checksum: d520efa0c8b64f4274dbcefc7e4c7a7a88d65a44c48ac30945a699aaaf025a67a2647bbecae82ad25a5ef2ca81bbf7444385d5d73b0bb2aadb9479e47593e542 + languageName: node + linkType: hard + "@metamask/safe-event-emitter@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/safe-event-emitter@npm:2.0.0" @@ -4872,33 +4899,31 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-controllers@npm:^1.0.2": - version: 1.0.2 - resolution: "@metamask/snaps-controllers@npm:1.0.2" +"@metamask/snaps-controllers@npm:^2.0.0": + version: 2.0.0 + resolution: "@metamask/snaps-controllers@npm:2.0.0" dependencies: - "@metamask/approval-controller": "npm:^3.0.0" - "@metamask/base-controller": "npm:^3.0.0" + "@metamask/approval-controller": "npm:^3.5.0" + "@metamask/base-controller": "npm:^3.2.0" "@metamask/object-multiplex": "npm:^1.2.0" - "@metamask/permission-controller": "npm:^4.0.0" - "@metamask/post-message-stream": "npm:^6.1.2" - "@metamask/rpc-methods": "npm:^1.0.2" - "@metamask/snaps-execution-environments": "npm:^1.0.2" - "@metamask/snaps-registry": "npm:^1.2.1" - "@metamask/snaps-utils": "npm:^1.0.2" - "@metamask/utils": "npm:^6.0.1" + "@metamask/permission-controller": "npm:^4.1.0" + "@metamask/post-message-stream": "npm:^7.0.0" + "@metamask/rpc-methods": "npm:^2.0.0" + "@metamask/snaps-execution-environments": "npm:^2.0.0" + "@metamask/snaps-registry": "npm:^2.0.0" + "@metamask/snaps-utils": "npm:^2.0.0" + "@metamask/utils": "npm:^8.1.0" "@xstate/fsm": "npm:^2.0.0" concat-stream: "npm:^2.0.0" - cron-parser: "npm:^4.5.0" - eth-rpc-errors: "npm:^4.0.2" + eth-rpc-errors: "npm:^4.0.3" gunzip-maybe: "npm:^1.4.2" immer: "npm:^9.0.6" json-rpc-engine: "npm:^6.1.0" json-rpc-middleware-stream: "npm:^4.2.0" nanoid: "npm:^3.1.31" - pump: "npm:^3.0.0" readable-web-to-node-stream: "npm:^3.0.2" tar-stream: "npm:^2.2.0" - checksum: 0770e9f7b3806ac447d272e29e4e749c83ba83cf197564b3391a3f23d36777054925a2541cdd39601df44562ea0a135ba8a320f4a93056de98a91f8cc5fc1823 + checksum: b129e5138c31baee348e960e53e3adfdbc838bdf71b8632171bf0815222be2787a8f5662a0739298d1b1c95c7230b2b3acdef23f31731174622cb744a5bae89a languageName: node linkType: hard @@ -4921,23 +4946,21 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-execution-environments@npm:^1.0.2": - version: 1.0.2 - resolution: "@metamask/snaps-execution-environments@npm:1.0.2" +"@metamask/snaps-execution-environments@npm:^2.0.0": + version: 2.0.0 + resolution: "@metamask/snaps-execution-environments@npm:2.0.0" dependencies: "@metamask/object-multiplex": "npm:^1.2.0" - "@metamask/post-message-stream": "npm:^6.1.1" - "@metamask/providers": "npm:^10.2.0" - "@metamask/rpc-methods": "npm:^1.0.2" - "@metamask/snaps-utils": "npm:^1.0.2" - "@metamask/utils": "npm:^6.0.1" + "@metamask/post-message-stream": "npm:^7.0.0" + "@metamask/providers": "npm:^11.1.1" + "@metamask/rpc-methods": "npm:^2.0.0" + "@metamask/snaps-utils": "npm:^2.0.0" + "@metamask/utils": "npm:^8.1.0" eth-rpc-errors: "npm:^4.0.3" json-rpc-engine: "npm:^6.1.0" - pump: "npm:^3.0.0" - ses: "npm:^0.18.1" - stream-browserify: "npm:^3.0.0" + nanoid: "npm:^3.1.31" superstruct: "npm:^1.0.3" - checksum: 2d40d3728d5db91dcb010dc9460e9716dd58a91c6415a4e5120879921d10b358caf2822ce228839217e9e4ff30fb163305e57229366a00ef91285523544ae3d2 + checksum: 474c2690937d7cc547a3e1000fb3218e26b42b0b3cb794083643cb39e161533ceb176f8d48d41da090a26ccb5e4f3d6e9c7fdc06306de98672444b83eac420df languageName: node linkType: hard @@ -4952,6 +4975,17 @@ __metadata: languageName: node linkType: hard +"@metamask/snaps-registry@npm:^2.0.0": + version: 2.0.0 + resolution: "@metamask/snaps-registry@npm:2.0.0" + dependencies: + "@metamask/utils": "npm:^8.1.0" + "@noble/secp256k1": "npm:^1.7.1" + superstruct: "npm:^1.0.3" + checksum: 99f8777708b6db3b2c12b66bd3d85f44c9e20ec78f04bd814a50c414fdb936a073d590926a494623691dd552592299eb1c3e8bb66382da46ec87c55694f46534 + languageName: node + linkType: hard + "@metamask/snaps-ui@npm:^0.37.4-flask.1": version: 0.37.4-flask.1 resolution: "@metamask/snaps-ui@npm:0.37.4-flask.1" @@ -4972,6 +5006,16 @@ __metadata: languageName: node linkType: hard +"@metamask/snaps-ui@npm:^2.0.0": + version: 2.0.0 + resolution: "@metamask/snaps-ui@npm:2.0.0" + dependencies: + "@metamask/utils": "npm:^8.1.0" + superstruct: "npm:^1.0.3" + checksum: 9ac3dabb1ca9731d510f10f2d81e0160a3f890b9f32c71f780d0fa1c9e72c26fa5e25f70c60afb1c6e216387634d31ad6c78a45f17f51a34ad1b655045f65586 + languageName: node + linkType: hard + "@metamask/snaps-utils@npm:^0.38.2-flask.1": version: 0.38.2-flask.1 resolution: "@metamask/snaps-utils@npm:0.38.2-flask.1" @@ -5029,6 +5073,35 @@ __metadata: languageName: node linkType: hard +"@metamask/snaps-utils@npm:^2.0.0": + version: 2.0.0 + resolution: "@metamask/snaps-utils@npm:2.0.0" + dependencies: + "@babel/core": "npm:^7.20.12" + "@babel/types": "npm:^7.18.7" + "@metamask/base-controller": "npm:^3.2.0" + "@metamask/key-tree": "npm:^9.0.0" + "@metamask/permission-controller": "npm:^4.1.0" + "@metamask/snaps-registry": "npm:^2.0.0" + "@metamask/snaps-ui": "npm:^2.0.0" + "@metamask/utils": "npm:^8.1.0" + "@noble/hashes": "npm:^1.3.1" + "@scure/base": "npm:^1.1.1" + chalk: "npm:^4.1.2" + cron-parser: "npm:^4.5.0" + eth-rpc-errors: "npm:^4.0.3" + fast-deep-equal: "npm:^3.1.3" + fast-json-stable-stringify: "npm:^2.1.0" + is-svg: "npm:^4.4.0" + rfdc: "npm:^1.3.0" + semver: "npm:^7.5.4" + ses: "npm:^0.18.7" + superstruct: "npm:^1.0.3" + validate-npm-package-name: "npm:^5.0.0" + checksum: 409a560a3d777398e0313828ae2096157ac6f088b891ed03ad70ebb886f53d8c742300409cb95ae031b39c7a322e86ae3ce7062257a7777c1689e77706aa0e18 + languageName: node + linkType: hard + "@metamask/subject-metadata-controller@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/subject-metadata-controller@npm:2.0.0" @@ -24101,9 +24174,9 @@ __metadata: "@metamask/signature-controller": "npm:^5.3.0" "@metamask/slip44": "npm:^3.0.0" "@metamask/smart-transactions-controller": "npm:^4.0.0" - "@metamask/snaps-controllers": "npm:^1.0.2" - "@metamask/snaps-ui": "npm:^1.0.2" - "@metamask/snaps-utils": "npm:^1.0.2" + "@metamask/snaps-controllers": "npm:^2.0.0" + "@metamask/snaps-ui": "npm:^2.0.0" + "@metamask/snaps-utils": "npm:^2.0.0" "@metamask/subject-metadata-controller": "npm:^2.0.0" "@metamask/test-dapp": "npm:^7.1.0" "@metamask/utils": "npm:^5.0.0" @@ -29068,7 +29141,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:2 || 3, readable-stream@npm:3, readable-stream@npm:^3.0.2, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": +"readable-stream@npm:2 || 3, readable-stream@npm:3, readable-stream@npm:3.6.2, readable-stream@npm:^3.0.2, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: From e356dbc889d700b2184e45c5b686d4ba65181341 Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Thu, 21 Sep 2023 13:18:29 +0000 Subject: [PATCH 3/9] Update LavaMoat policies --- lavamoat/browserify/beta/policy.json | 98 +++------- lavamoat/browserify/desktop/policy.json | 171 +++++++---------- lavamoat/browserify/flask/policy.json | 171 +++++++---------- lavamoat/browserify/main/policy.json | 222 ++++++++++++++-------- lavamoat/browserify/mmi/policy.json | 238 +++++++++++++++--------- lavamoat/build-system/policy.json | 116 ------------ 6 files changed, 463 insertions(+), 553 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 0470833108c3..0dd6241e4aa9 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1834,10 +1834,10 @@ "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/snaps-ui": true, + "@metamask/rpc-methods>@metamask/snaps-utils": true, "@metamask/rpc-methods>@metamask/utils": true, "@metamask/rpc-methods>nanoid": true, - "@metamask/snaps-ui": true, - "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } @@ -1857,6 +1857,35 @@ "@metamask/scure-bip39": true } }, + "@metamask/rpc-methods>@metamask/snaps-ui": { + "packages": { + "@metamask/rpc-methods>@metamask/utils": true, + "superstruct": true + } + }, + "@metamask/rpc-methods>@metamask/snaps-utils": { + "globals": { + "TextDecoder": true, + "URL": true, + "console.error": true, + "console.log": true, + "console.warn": true, + "document.body.appendChild": true, + "document.createElement": true + }, + "packages": { + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/utils": true, + "@metamask/snaps-utils>cron-parser": true, + "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>rfdc": true, + "@metamask/snaps-utils>validate-npm-package-name": true, + "semver": true, + "superstruct": true + } + }, "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, @@ -1959,71 +1988,6 @@ "crypto.getRandomValues": true } }, - "@metamask/snaps-ui": { - "packages": { - "@metamask/snaps-ui>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/snaps-ui>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true, - "superstruct": true - } - }, - "@metamask/snaps-utils": { - "globals": { - "TextDecoder": true, - "URL": true, - "console.error": true, - "console.log": true, - "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/snaps-utils>@metamask/key-tree": true, - "@metamask/snaps-utils>@metamask/utils": true, - "@metamask/snaps-utils>cron-parser": true, - "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/snaps-utils>rfdc": true, - "@metamask/snaps-utils>validate-npm-package-name": true, - "semver": true, - "superstruct": true - } - }, - "@metamask/snaps-utils>@metamask/key-tree": { - "packages": { - "@metamask/key-tree>@noble/ed25519": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/scure-bip39": true, - "@metamask/snaps-utils>@metamask/utils": true - } - }, - "@metamask/snaps-utils>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true, - "superstruct": true - } - }, "@metamask/snaps-utils>cron-parser": { "packages": { "browserify>browser-resolve": true, diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json index 4c633de6fec1..173f8a035c25 100644 --- a/lavamoat/browserify/desktop/policy.json +++ b/lavamoat/browserify/desktop/policy.json @@ -2036,25 +2036,42 @@ "eth-rpc-errors": true } }, - "@metamask/rpc-methods-flask": { + "@metamask/rpc-methods": { "packages": { - "@metamask/key-tree": true, + "@metamask/browser-passworder": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/rpc-methods-flask>@metamask/snaps-ui": true, - "@metamask/rpc-methods-flask>@metamask/snaps-utils": true, - "@metamask/rpc-methods-flask>@metamask/utils": true, + "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/snaps-ui": true, + "@metamask/rpc-methods>@metamask/snaps-utils": true, + "@metamask/rpc-methods>@metamask/utils": true, + "@metamask/rpc-methods>nanoid": true, "eth-rpc-errors": true, "superstruct": true } }, - "@metamask/rpc-methods-flask>@metamask/snaps-ui": { + "@metamask/rpc-methods-flask>nanoid": { + "globals": { + "crypto.getRandomValues": true + } + }, + "@metamask/rpc-methods>@metamask/key-tree": { "packages": { - "@metamask/rpc-methods-flask>@metamask/utils": true, + "@metamask/key-tree>@noble/ed25519": true, + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@noble/secp256k1": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/rpc-methods>@metamask/utils": true, + "@metamask/scure-bip39": true + } + }, + "@metamask/rpc-methods>@metamask/snaps-ui": { + "packages": { + "@metamask/rpc-methods>@metamask/utils": true, "superstruct": true } }, - "@metamask/rpc-methods-flask>@metamask/snaps-utils": { + "@metamask/rpc-methods>@metamask/snaps-utils": { "globals": { "TextDecoder": true, "URL": true, @@ -2065,24 +2082,19 @@ "document.createElement": true }, "packages": { - "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods-flask>@metamask/utils": true, - "@metamask/snaps-utils-flask>is-svg": true, + "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/utils": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, - "browserify>buffer": true, - "browserify>path-browserify": true, - "browserify>process": true, - "chalk": true, "semver": true, "superstruct": true } }, - "@metamask/rpc-methods-flask>@metamask/utils": { + "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2095,11 +2107,6 @@ "superstruct": true } }, - "@metamask/rpc-methods-flask>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/rpc-methods>nanoid": { "globals": { "crypto.getRandomValues": true @@ -2179,7 +2186,7 @@ "define": true } }, - "@metamask/snaps-controllers-flask": { + "@metamask/snaps-controllers": { "globals": { "URL": true, "chrome.offscreen.createDocument": true, @@ -2193,24 +2200,29 @@ "@metamask/base-controller": true, "@metamask/permission-controller": true, "@metamask/providers>@metamask/object-multiplex": true, - "@metamask/snaps-controllers-flask>@metamask/post-message-stream": true, - "@metamask/snaps-controllers-flask>@metamask/rpc-methods": true, - "@metamask/snaps-controllers-flask>@metamask/snaps-registry": true, - "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true, - "@metamask/snaps-controllers-flask>@metamask/utils": true, - "@metamask/snaps-controllers-flask>concat-stream": true, - "@metamask/snaps-controllers-flask>nanoid": true, + "@metamask/snaps-controllers>@metamask/post-message-stream": true, + "@metamask/snaps-controllers>@metamask/rpc-methods": true, + "@metamask/snaps-controllers>@metamask/snaps-registry": true, + "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, + "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>gunzip-maybe": true, + "@metamask/snaps-controllers>nanoid": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>tar-stream": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "json-rpc-engine": true, "json-rpc-middleware-stream": true, "stream-browserify": true } }, - "@metamask/snaps-controllers-flask>@metamask/post-message-stream": { + "@metamask/snaps-controllers-flask>nanoid": { + "globals": { + "crypto.getRandomValues": true + } + }, + "@metamask/snaps-controllers>@metamask/post-message-stream": { "globals": { "MessageEvent.prototype": true, "WorkerGlobalScope": true, @@ -2222,11 +2234,11 @@ "removeEventListener": true }, "packages": { - "@metamask/snaps-controllers-flask>@metamask/post-message-stream>@metamask/utils": true, - "@metamask/snaps-controllers-flask>concat-stream>readable-stream": true + "@metamask/snaps-controllers>@metamask/post-message-stream>@metamask/utils": true, + "@metamask/snaps-controllers>concat-stream>readable-stream": true } }, - "@metamask/snaps-controllers-flask>@metamask/post-message-stream>@metamask/utils": { + "@metamask/snaps-controllers>@metamask/post-message-stream>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2238,60 +2250,26 @@ "superstruct": true } }, - "@metamask/snaps-controllers-flask>@metamask/rpc-methods": { + "@metamask/snaps-controllers>@metamask/rpc-methods": { "packages": { "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-ui": true, - "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true, - "@metamask/snaps-controllers-flask>@metamask/utils": true, + "@metamask/snaps-controllers>@metamask/utils": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } }, - "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-ui": { - "packages": { - "@metamask/snaps-controllers-flask>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/snaps-controllers-flask>@metamask/snaps-registry": { + "@metamask/snaps-controllers>@metamask/snaps-registry": { "packages": { "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/snaps-controllers-flask>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/snaps-controllers-flask>@metamask/snaps-utils": { - "globals": { - "TextDecoder": true, - "URL": true, - "console.error": true, - "console.log": true, - "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true - }, - "packages": { - "@metamask/key-tree": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/snaps-controllers-flask>@metamask/utils": true, - "@metamask/snaps-utils-flask>is-svg": true, - "@metamask/snaps-utils>cron-parser": true, - "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/snaps-utils>rfdc": true, - "@metamask/snaps-utils>validate-npm-package-name": true, - "browserify>buffer": true, - "browserify>path-browserify": true, - "browserify>process": true, - "chalk": true, - "semver": true, + "@metamask/snaps-controllers>@metamask/utils": true, "superstruct": true } }, - "@metamask/snaps-controllers-flask>@metamask/utils": { + "@metamask/snaps-controllers>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2304,16 +2282,16 @@ "superstruct": true } }, - "@metamask/snaps-controllers-flask>concat-stream": { + "@metamask/snaps-controllers>concat-stream": { "packages": { - "@metamask/snaps-controllers-flask>concat-stream>readable-stream": true, + "@metamask/snaps-controllers>concat-stream>readable-stream": true, "browserify>buffer": true, "browserify>concat-stream>typedarray": true, "pumpify>inherits": true, "terser>source-map-support>buffer-from": true } }, - "@metamask/snaps-controllers-flask>concat-stream>readable-stream": { + "@metamask/snaps-controllers>concat-stream>readable-stream": { "packages": { "browserify>browser-resolve": true, "browserify>buffer": true, @@ -2324,11 +2302,6 @@ "webpack>events": true } }, - "@metamask/snaps-controllers-flask>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-controllers>gunzip-maybe": { "packages": { "@metamask/snaps-controllers>gunzip-maybe>browserify-zlib": true, @@ -2457,13 +2430,13 @@ "webpack>events": true } }, - "@metamask/snaps-ui-flask": { + "@metamask/snaps-ui": { "packages": { - "@metamask/snaps-ui-flask>@metamask/utils": true, + "@metamask/snaps-ui>@metamask/utils": true, "superstruct": true } }, - "@metamask/snaps-ui-flask>@metamask/utils": { + "@metamask/snaps-ui>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2476,7 +2449,7 @@ "superstruct": true } }, - "@metamask/snaps-utils-flask": { + "@metamask/snaps-utils": { "globals": { "TextDecoder": true, "URL": true, @@ -2490,10 +2463,10 @@ "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@scure/base": true, - "@metamask/snaps-utils-flask>@metamask/utils": true, - "@metamask/snaps-utils-flask>is-svg": true, + "@metamask/snaps-utils>@metamask/utils": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>is-svg": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, "browserify>buffer": true, @@ -2504,7 +2477,7 @@ "superstruct": true } }, - "@metamask/snaps-utils-flask>@metamask/utils": { + "@metamask/snaps-utils>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2517,24 +2490,24 @@ "superstruct": true } }, - "@metamask/snaps-utils-flask>is-svg": { + "@metamask/snaps-utils>cron-parser": { "packages": { - "@metamask/snaps-utils-flask>is-svg>fast-xml-parser": true + "browserify>browser-resolve": true, + "luxon": true } }, - "@metamask/snaps-utils-flask>is-svg>fast-xml-parser": { + "@metamask/snaps-utils>is-svg": { + "packages": { + "@metamask/snaps-utils>is-svg>fast-xml-parser": true + } + }, + "@metamask/snaps-utils>is-svg>fast-xml-parser": { "globals": { "entityName": true, "val": true }, "packages": { - "@metamask/snaps-utils-flask>is-svg>fast-xml-parser>strnum": true - } - }, - "@metamask/snaps-utils>cron-parser": { - "packages": { - "browserify>browser-resolve": true, - "luxon": true + "@metamask/snaps-utils>is-svg>fast-xml-parser>strnum": true } }, "@metamask/snaps-utils>rfdc": { diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index aa332f56b1bb..1ca7cfa472da 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -2052,25 +2052,42 @@ "eth-rpc-errors": true } }, - "@metamask/rpc-methods-flask": { + "@metamask/rpc-methods": { "packages": { - "@metamask/key-tree": true, + "@metamask/browser-passworder": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/rpc-methods-flask>@metamask/snaps-ui": true, - "@metamask/rpc-methods-flask>@metamask/snaps-utils": true, - "@metamask/rpc-methods-flask>@metamask/utils": true, + "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/snaps-ui": true, + "@metamask/rpc-methods>@metamask/snaps-utils": true, + "@metamask/rpc-methods>@metamask/utils": true, + "@metamask/rpc-methods>nanoid": true, "eth-rpc-errors": true, "superstruct": true } }, - "@metamask/rpc-methods-flask>@metamask/snaps-ui": { + "@metamask/rpc-methods-flask>nanoid": { + "globals": { + "crypto.getRandomValues": true + } + }, + "@metamask/rpc-methods>@metamask/key-tree": { "packages": { - "@metamask/rpc-methods-flask>@metamask/utils": true, + "@metamask/key-tree>@noble/ed25519": true, + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@noble/secp256k1": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/rpc-methods>@metamask/utils": true, + "@metamask/scure-bip39": true + } + }, + "@metamask/rpc-methods>@metamask/snaps-ui": { + "packages": { + "@metamask/rpc-methods>@metamask/utils": true, "superstruct": true } }, - "@metamask/rpc-methods-flask>@metamask/snaps-utils": { + "@metamask/rpc-methods>@metamask/snaps-utils": { "globals": { "TextDecoder": true, "URL": true, @@ -2081,24 +2098,19 @@ "document.createElement": true }, "packages": { - "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods-flask>@metamask/utils": true, - "@metamask/snaps-utils-flask>is-svg": true, + "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/utils": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, - "browserify>buffer": true, - "browserify>path-browserify": true, - "browserify>process": true, - "chalk": true, "semver": true, "superstruct": true } }, - "@metamask/rpc-methods-flask>@metamask/utils": { + "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2111,11 +2123,6 @@ "superstruct": true } }, - "@metamask/rpc-methods-flask>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/rpc-methods>nanoid": { "globals": { "crypto.getRandomValues": true @@ -2195,7 +2202,7 @@ "define": true } }, - "@metamask/snaps-controllers-flask": { + "@metamask/snaps-controllers": { "globals": { "URL": true, "chrome.offscreen.createDocument": true, @@ -2209,24 +2216,29 @@ "@metamask/base-controller": true, "@metamask/permission-controller": true, "@metamask/providers>@metamask/object-multiplex": true, - "@metamask/snaps-controllers-flask>@metamask/post-message-stream": true, - "@metamask/snaps-controllers-flask>@metamask/rpc-methods": true, - "@metamask/snaps-controllers-flask>@metamask/snaps-registry": true, - "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true, - "@metamask/snaps-controllers-flask>@metamask/utils": true, - "@metamask/snaps-controllers-flask>concat-stream": true, - "@metamask/snaps-controllers-flask>nanoid": true, + "@metamask/snaps-controllers>@metamask/post-message-stream": true, + "@metamask/snaps-controllers>@metamask/rpc-methods": true, + "@metamask/snaps-controllers>@metamask/snaps-registry": true, + "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, + "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>gunzip-maybe": true, + "@metamask/snaps-controllers>nanoid": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>tar-stream": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "json-rpc-engine": true, "json-rpc-middleware-stream": true, "stream-browserify": true } }, - "@metamask/snaps-controllers-flask>@metamask/post-message-stream": { + "@metamask/snaps-controllers-flask>nanoid": { + "globals": { + "crypto.getRandomValues": true + } + }, + "@metamask/snaps-controllers>@metamask/post-message-stream": { "globals": { "MessageEvent.prototype": true, "WorkerGlobalScope": true, @@ -2238,11 +2250,11 @@ "removeEventListener": true }, "packages": { - "@metamask/snaps-controllers-flask>@metamask/post-message-stream>@metamask/utils": true, - "@metamask/snaps-controllers-flask>concat-stream>readable-stream": true + "@metamask/snaps-controllers>@metamask/post-message-stream>@metamask/utils": true, + "@metamask/snaps-controllers>concat-stream>readable-stream": true } }, - "@metamask/snaps-controllers-flask>@metamask/post-message-stream>@metamask/utils": { + "@metamask/snaps-controllers>@metamask/post-message-stream>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2254,60 +2266,26 @@ "superstruct": true } }, - "@metamask/snaps-controllers-flask>@metamask/rpc-methods": { + "@metamask/snaps-controllers>@metamask/rpc-methods": { "packages": { "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-ui": true, - "@metamask/snaps-controllers-flask>@metamask/snaps-utils": true, - "@metamask/snaps-controllers-flask>@metamask/utils": true, + "@metamask/snaps-controllers>@metamask/utils": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } }, - "@metamask/snaps-controllers-flask>@metamask/rpc-methods>@metamask/snaps-ui": { - "packages": { - "@metamask/snaps-controllers-flask>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/snaps-controllers-flask>@metamask/snaps-registry": { + "@metamask/snaps-controllers>@metamask/snaps-registry": { "packages": { "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/snaps-controllers-flask>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/snaps-controllers-flask>@metamask/snaps-utils": { - "globals": { - "TextDecoder": true, - "URL": true, - "console.error": true, - "console.log": true, - "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true - }, - "packages": { - "@metamask/key-tree": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/snaps-controllers-flask>@metamask/utils": true, - "@metamask/snaps-utils-flask>is-svg": true, - "@metamask/snaps-utils>cron-parser": true, - "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/snaps-utils>rfdc": true, - "@metamask/snaps-utils>validate-npm-package-name": true, - "browserify>buffer": true, - "browserify>path-browserify": true, - "browserify>process": true, - "chalk": true, - "semver": true, + "@metamask/snaps-controllers>@metamask/utils": true, "superstruct": true } }, - "@metamask/snaps-controllers-flask>@metamask/utils": { + "@metamask/snaps-controllers>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2320,16 +2298,16 @@ "superstruct": true } }, - "@metamask/snaps-controllers-flask>concat-stream": { + "@metamask/snaps-controllers>concat-stream": { "packages": { - "@metamask/snaps-controllers-flask>concat-stream>readable-stream": true, + "@metamask/snaps-controllers>concat-stream>readable-stream": true, "browserify>buffer": true, "browserify>concat-stream>typedarray": true, "pumpify>inherits": true, "terser>source-map-support>buffer-from": true } }, - "@metamask/snaps-controllers-flask>concat-stream>readable-stream": { + "@metamask/snaps-controllers>concat-stream>readable-stream": { "packages": { "browserify>browser-resolve": true, "browserify>buffer": true, @@ -2340,11 +2318,6 @@ "webpack>events": true } }, - "@metamask/snaps-controllers-flask>nanoid": { - "globals": { - "crypto.getRandomValues": true - } - }, "@metamask/snaps-controllers>gunzip-maybe": { "packages": { "@metamask/snaps-controllers>gunzip-maybe>browserify-zlib": true, @@ -2473,13 +2446,13 @@ "webpack>events": true } }, - "@metamask/snaps-ui-flask": { + "@metamask/snaps-ui": { "packages": { - "@metamask/snaps-ui-flask>@metamask/utils": true, + "@metamask/snaps-ui>@metamask/utils": true, "superstruct": true } }, - "@metamask/snaps-ui-flask>@metamask/utils": { + "@metamask/snaps-ui>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2492,7 +2465,7 @@ "superstruct": true } }, - "@metamask/snaps-utils-flask": { + "@metamask/snaps-utils": { "globals": { "TextDecoder": true, "URL": true, @@ -2506,10 +2479,10 @@ "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@scure/base": true, - "@metamask/snaps-utils-flask>@metamask/utils": true, - "@metamask/snaps-utils-flask>is-svg": true, + "@metamask/snaps-utils>@metamask/utils": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>is-svg": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, "browserify>buffer": true, @@ -2520,7 +2493,7 @@ "superstruct": true } }, - "@metamask/snaps-utils-flask>@metamask/utils": { + "@metamask/snaps-utils>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -2533,24 +2506,24 @@ "superstruct": true } }, - "@metamask/snaps-utils-flask>is-svg": { + "@metamask/snaps-utils>cron-parser": { "packages": { - "@metamask/snaps-utils-flask>is-svg>fast-xml-parser": true + "browserify>browser-resolve": true, + "luxon": true } }, - "@metamask/snaps-utils-flask>is-svg>fast-xml-parser": { + "@metamask/snaps-utils>is-svg": { + "packages": { + "@metamask/snaps-utils>is-svg>fast-xml-parser": true + } + }, + "@metamask/snaps-utils>is-svg>fast-xml-parser": { "globals": { "entityName": true, "val": true }, "packages": { - "@metamask/snaps-utils-flask>is-svg>fast-xml-parser>strnum": true - } - }, - "@metamask/snaps-utils>cron-parser": { - "packages": { - "browserify>browser-resolve": true, - "luxon": true + "@metamask/snaps-utils>is-svg>fast-xml-parser>strnum": true } }, "@metamask/snaps-utils>rfdc": { diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index c8b44246f8b9..f9d6130cb7cc 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1475,6 +1475,29 @@ "jest-canvas-mock>moo-color>color-name": true } }, + "@metamask/key-tree": { + "packages": { + "@metamask/key-tree>@metamask/utils": true, + "@metamask/key-tree>@noble/ed25519": true, + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@noble/secp256k1": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/scure-bip39": true + } + }, + "@metamask/key-tree>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/key-tree>@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true, + "superstruct": true + } + }, "@metamask/key-tree>@noble/ed25519": { "globals": { "crypto": true @@ -1808,52 +1831,6 @@ "eslint>optionator>fast-levenshtein": true } }, - "@metamask/post-message-stream": { - "globals": { - "MessageEvent.prototype": true, - "WorkerGlobalScope": true, - "addEventListener": true, - "browser": true, - "chrome": true, - "location.origin": true, - "postMessage": true, - "removeEventListener": true - }, - "packages": { - "@metamask/post-message-stream>readable-stream": true, - "@metamask/utils": true - } - }, - "@metamask/post-message-stream>readable-stream": { - "packages": { - "@metamask/post-message-stream>readable-stream>process-nextick-args": true, - "@metamask/post-message-stream>readable-stream>safe-buffer": true, - "@metamask/post-message-stream>readable-stream>string_decoder": true, - "browserify>browser-resolve": true, - "browserify>process": true, - "browserify>timers-browserify": true, - "pumpify>inherits": true, - "readable-stream>core-util-is": true, - "readable-stream>isarray": true, - "readable-stream>util-deprecate": true, - "webpack>events": true - } - }, - "@metamask/post-message-stream>readable-stream>process-nextick-args": { - "packages": { - "browserify>process": true - } - }, - "@metamask/post-message-stream>readable-stream>safe-buffer": { - "packages": { - "browserify>buffer": true - } - }, - "@metamask/post-message-stream>readable-stream>string_decoder": { - "packages": { - "@metamask/post-message-stream>readable-stream>safe-buffer": true - } - }, "@metamask/ppom-validator>elliptic": { "packages": { "@metamask/ppom-validator>elliptic>brorand": true, @@ -1906,10 +1883,10 @@ "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/snaps-ui": true, + "@metamask/rpc-methods>@metamask/snaps-utils": true, "@metamask/rpc-methods>@metamask/utils": true, "@metamask/rpc-methods>nanoid": true, - "@metamask/snaps-ui": true, - "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } @@ -1929,6 +1906,35 @@ "@metamask/scure-bip39": true } }, + "@metamask/rpc-methods>@metamask/snaps-ui": { + "packages": { + "@metamask/rpc-methods>@metamask/utils": true, + "superstruct": true + } + }, + "@metamask/rpc-methods>@metamask/snaps-utils": { + "globals": { + "TextDecoder": true, + "URL": true, + "console.error": true, + "console.log": true, + "console.warn": true, + "document.body.appendChild": true, + "document.createElement": true + }, + "packages": { + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/utils": true, + "@metamask/snaps-utils>cron-parser": true, + "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>rfdc": true, + "@metamask/snaps-utils>validate-npm-package-name": true, + "semver": true, + "superstruct": true + } + }, "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2034,9 +2040,10 @@ "packages": { "@metamask/base-controller": true, "@metamask/permission-controller": true, - "@metamask/post-message-stream": true, "@metamask/providers>@metamask/object-multiplex": true, - "@metamask/rpc-methods": true, + "@metamask/snaps-controllers>@metamask/post-message-stream": true, + "@metamask/snaps-controllers>@metamask/rpc-methods": true, + "@metamask/snaps-controllers>@metamask/snaps-registry": true, "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, @@ -2045,11 +2052,10 @@ "@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-utils": true, - "@metamask/snaps-utils>@metamask/snaps-registry": true, "eth-rpc-errors": true, "json-rpc-engine": true, "json-rpc-middleware-stream": true, - "pump": true + "stream-browserify": true } }, "@metamask/snaps-controllers-flask>nanoid": { @@ -2057,6 +2063,53 @@ "crypto.getRandomValues": true } }, + "@metamask/snaps-controllers>@metamask/post-message-stream": { + "globals": { + "MessageEvent.prototype": true, + "WorkerGlobalScope": true, + "addEventListener": true, + "browser": true, + "chrome": true, + "location.origin": true, + "postMessage": true, + "removeEventListener": true + }, + "packages": { + "@metamask/snaps-controllers>@metamask/post-message-stream>@metamask/utils": true, + "@metamask/snaps-controllers>concat-stream>readable-stream": true + } + }, + "@metamask/snaps-controllers>@metamask/post-message-stream>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "browserify>buffer": true, + "nock>debug": true, + "semver": true, + "superstruct": true + } + }, + "@metamask/snaps-controllers>@metamask/rpc-methods": { + "packages": { + "@metamask/key-tree": true, + "@metamask/key-tree>@noble/hashes": true, + "@metamask/permission-controller": true, + "@metamask/snaps-controllers>@metamask/utils": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, + "eth-rpc-errors": true, + "superstruct": true + } + }, + "@metamask/snaps-controllers>@metamask/snaps-registry": { + "packages": { + "@metamask/key-tree>@noble/secp256k1": true, + "@metamask/snaps-controllers>@metamask/utils": true, + "superstruct": true + } + }, "@metamask/snaps-controllers>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2248,44 +2301,19 @@ "document.createElement": true }, "packages": { + "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@scure/base": true, - "@metamask/snaps-utils>@metamask/key-tree": true, "@metamask/snaps-utils>@metamask/utils": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>is-svg": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, - "semver": true, - "superstruct": true - } - }, - "@metamask/snaps-utils>@metamask/key-tree": { - "packages": { - "@metamask/key-tree>@noble/ed25519": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/scure-bip39": true, - "@metamask/snaps-utils>@metamask/utils": true - } - }, - "@metamask/snaps-utils>@metamask/snaps-registry": { - "packages": { - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, "browserify>buffer": true, - "nock>debug": true, + "browserify>path-browserify": true, + "browserify>process": true, + "chalk": true, "semver": true, "superstruct": true } @@ -2309,6 +2337,20 @@ "luxon": true } }, + "@metamask/snaps-utils>is-svg": { + "packages": { + "@metamask/snaps-utils>is-svg>fast-xml-parser": true + } + }, + "@metamask/snaps-utils>is-svg>fast-xml-parser": { + "globals": { + "entityName": true, + "val": true + }, + "packages": { + "@metamask/snaps-utils>is-svg>fast-xml-parser>strnum": true + } + }, "@metamask/snaps-utils>rfdc": { "packages": { "browserify>buffer": true @@ -3412,6 +3454,22 @@ "document.createElement": true } }, + "chalk": { + "packages": { + "chalk>ansi-styles": true, + "chalk>supports-color": true + } + }, + "chalk>ansi-styles": { + "packages": { + "chalk>ansi-styles>color-convert": true + } + }, + "chalk>ansi-styles>color-convert": { + "packages": { + "jest-canvas-mock>moo-color>color-name": true + } + }, "classnames": { "globals": { "classNames": "write", diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 769316ed5578..853e885d1f2c 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -1615,6 +1615,29 @@ "jest-canvas-mock>moo-color>color-name": true } }, + "@metamask/key-tree": { + "packages": { + "@metamask/key-tree>@metamask/utils": true, + "@metamask/key-tree>@noble/ed25519": true, + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@noble/secp256k1": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/scure-bip39": true + } + }, + "@metamask/key-tree>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/key-tree>@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true, + "superstruct": true + } + }, "@metamask/key-tree>@noble/ed25519": { "globals": { "crypto": true @@ -1948,52 +1971,6 @@ "eslint>optionator>fast-levenshtein": true } }, - "@metamask/post-message-stream": { - "globals": { - "MessageEvent.prototype": true, - "WorkerGlobalScope": true, - "addEventListener": true, - "browser": true, - "chrome": true, - "location.origin": true, - "postMessage": true, - "removeEventListener": true - }, - "packages": { - "@metamask/post-message-stream>readable-stream": true, - "@metamask/utils": true - } - }, - "@metamask/post-message-stream>readable-stream": { - "packages": { - "@metamask/post-message-stream>readable-stream>process-nextick-args": true, - "@metamask/post-message-stream>readable-stream>safe-buffer": true, - "@metamask/post-message-stream>readable-stream>string_decoder": true, - "browserify>browser-resolve": true, - "browserify>events": true, - "browserify>process": true, - "browserify>timers-browserify": true, - "pumpify>inherits": true, - "readable-stream>core-util-is": true, - "readable-stream>isarray": true, - "readable-stream>util-deprecate": true - } - }, - "@metamask/post-message-stream>readable-stream>process-nextick-args": { - "packages": { - "browserify>process": true - } - }, - "@metamask/post-message-stream>readable-stream>safe-buffer": { - "packages": { - "browserify>buffer": true - } - }, - "@metamask/post-message-stream>readable-stream>string_decoder": { - "packages": { - "@metamask/post-message-stream>readable-stream>safe-buffer": true - } - }, "@metamask/ppom-validator>elliptic": { "packages": { "@metamask/ppom-validator>elliptic>brorand": true, @@ -2046,10 +2023,10 @@ "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/snaps-ui": true, + "@metamask/rpc-methods>@metamask/snaps-utils": true, "@metamask/rpc-methods>@metamask/utils": true, "@metamask/rpc-methods>nanoid": true, - "@metamask/snaps-ui": true, - "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } @@ -2069,6 +2046,35 @@ "@metamask/scure-bip39": true } }, + "@metamask/rpc-methods>@metamask/snaps-ui": { + "packages": { + "@metamask/rpc-methods>@metamask/utils": true, + "superstruct": true + } + }, + "@metamask/rpc-methods>@metamask/snaps-utils": { + "globals": { + "TextDecoder": true, + "URL": true, + "console.error": true, + "console.log": true, + "console.warn": true, + "document.body.appendChild": true, + "document.createElement": true + }, + "packages": { + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/rpc-methods>@metamask/key-tree": true, + "@metamask/rpc-methods>@metamask/utils": true, + "@metamask/snaps-utils>cron-parser": true, + "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>rfdc": true, + "@metamask/snaps-utils>validate-npm-package-name": true, + "semver": true, + "superstruct": true + } + }, "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2174,9 +2180,10 @@ "packages": { "@metamask/base-controller": true, "@metamask/permission-controller": true, - "@metamask/post-message-stream": true, "@metamask/providers>@metamask/object-multiplex": true, - "@metamask/rpc-methods": true, + "@metamask/snaps-controllers>@metamask/post-message-stream": true, + "@metamask/snaps-controllers>@metamask/rpc-methods": true, + "@metamask/snaps-controllers>@metamask/snaps-registry": true, "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, @@ -2185,11 +2192,10 @@ "@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-utils": true, - "@metamask/snaps-utils>@metamask/snaps-registry": true, "eth-rpc-errors": true, "json-rpc-engine": true, "json-rpc-middleware-stream": true, - "pump": true + "stream-browserify": true } }, "@metamask/snaps-controllers-flask>nanoid": { @@ -2197,6 +2203,53 @@ "crypto.getRandomValues": true } }, + "@metamask/snaps-controllers>@metamask/post-message-stream": { + "globals": { + "MessageEvent.prototype": true, + "WorkerGlobalScope": true, + "addEventListener": true, + "browser": true, + "chrome": true, + "location.origin": true, + "postMessage": true, + "removeEventListener": true + }, + "packages": { + "@metamask/snaps-controllers>@metamask/post-message-stream>@metamask/utils": true, + "@metamask/snaps-controllers>concat-stream>readable-stream": true + } + }, + "@metamask/snaps-controllers>@metamask/post-message-stream>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "browserify>buffer": true, + "nock>debug": true, + "semver": true, + "superstruct": true + } + }, + "@metamask/snaps-controllers>@metamask/rpc-methods": { + "packages": { + "@metamask/key-tree": true, + "@metamask/key-tree>@noble/hashes": true, + "@metamask/permission-controller": true, + "@metamask/snaps-controllers>@metamask/utils": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, + "eth-rpc-errors": true, + "superstruct": true + } + }, + "@metamask/snaps-controllers>@metamask/snaps-registry": { + "packages": { + "@metamask/key-tree>@noble/secp256k1": true, + "@metamask/snaps-controllers>@metamask/utils": true, + "superstruct": true + } + }, "@metamask/snaps-controllers>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2223,11 +2276,11 @@ "packages": { "browserify>browser-resolve": true, "browserify>buffer": true, - "browserify>events": true, "browserify>process": true, "browserify>string_decoder": true, "pumpify>inherits": true, - "readable-stream>util-deprecate": true + "readable-stream>util-deprecate": true, + "webpack>events": true } }, "@metamask/snaps-controllers>gunzip-maybe": { @@ -2322,11 +2375,11 @@ "packages": { "browserify>browser-resolve": true, "browserify>buffer": true, - "browserify>events": true, "browserify>process": true, "browserify>string_decoder": true, "pumpify>inherits": true, - "readable-stream>util-deprecate": true + "readable-stream>util-deprecate": true, + "webpack>events": true } }, "@metamask/snaps-controllers>tar-stream": { @@ -2351,11 +2404,11 @@ "packages": { "browserify>browser-resolve": true, "browserify>buffer": true, - "browserify>events": true, "browserify>process": true, "browserify>string_decoder": true, "pumpify>inherits": true, - "readable-stream>util-deprecate": true + "readable-stream>util-deprecate": true, + "webpack>events": true } }, "@metamask/snaps-ui": { @@ -2388,44 +2441,19 @@ "document.createElement": true }, "packages": { + "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/key-tree>@scure/base": true, - "@metamask/snaps-utils>@metamask/key-tree": true, "@metamask/snaps-utils>@metamask/utils": true, "@metamask/snaps-utils>cron-parser": true, "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>is-svg": true, "@metamask/snaps-utils>rfdc": true, "@metamask/snaps-utils>validate-npm-package-name": true, - "semver": true, - "superstruct": true - } - }, - "@metamask/snaps-utils>@metamask/key-tree": { - "packages": { - "@metamask/key-tree>@noble/ed25519": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/scure-bip39": true, - "@metamask/snaps-utils>@metamask/utils": true - } - }, - "@metamask/snaps-utils>@metamask/snaps-registry": { - "packages": { - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, "browserify>buffer": true, - "nock>debug": true, + "browserify>path-browserify": true, + "browserify>process": true, + "chalk": true, "semver": true, "superstruct": true } @@ -2449,6 +2477,20 @@ "luxon": true } }, + "@metamask/snaps-utils>is-svg": { + "packages": { + "@metamask/snaps-utils>is-svg>fast-xml-parser": true + } + }, + "@metamask/snaps-utils>is-svg>fast-xml-parser": { + "globals": { + "entityName": true, + "val": true + }, + "packages": { + "@metamask/snaps-utils>is-svg>fast-xml-parser>strnum": true + } + }, "@metamask/snaps-utils>rfdc": { "packages": { "browserify>buffer": true @@ -3552,6 +3594,22 @@ "document.createElement": true } }, + "chalk": { + "packages": { + "chalk>ansi-styles": true, + "chalk>supports-color": true + } + }, + "chalk>ansi-styles": { + "packages": { + "chalk>ansi-styles>color-convert": true + } + }, + "chalk>ansi-styles>color-convert": { + "packages": { + "jest-canvas-mock>moo-color>color-name": true + } + }, "classnames": { "globals": { "classNames": "write", @@ -4455,11 +4513,11 @@ "packages": { "browserify>browser-resolve": true, "browserify>buffer": true, - "browserify>events": true, "browserify>process": true, "browserify>string_decoder": true, "pumpify>inherits": true, - "readable-stream>util-deprecate": true + "readable-stream>util-deprecate": true, + "webpack>events": true } }, "mocha>serialize-javascript>randombytes": { diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index baf15bfb8aa7..baacaffa92fa 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -1166,39 +1166,6 @@ "define": true } }, - "@storybook/test-runner>glob": { - "builtin": { - "assert": true, - "events.EventEmitter": true, - "fs": true, - "path.isAbsolute": true, - "path.join": true, - "path.resolve": true, - "util": true - }, - "globals": { - "console.error": true, - "process.cwd": true, - "process.nextTick": true, - "process.platform": true - }, - "packages": { - "@storybook/test-runner>glob>minimatch": true, - "nyc>glob>fs.realpath": true, - "nyc>glob>inflight": true, - "pump>once": true, - "pumpify>inherits": true - } - }, - "@storybook/test-runner>glob>minimatch": { - "globals": { - "console.error": true, - "process": true - }, - "packages": { - "addons-linter>glob>minimatch>brace-expansion": true - } - }, "@typescript-eslint/eslint-plugin": { "packages": { "@typescript-eslint/eslint-plugin>@typescript-eslint/type-utils": true, @@ -1302,89 +1269,6 @@ "typescript": true } }, - "addons-linter>glob>minimatch>brace-expansion": { - "packages": { - "stylelint>balanced-match": true - } - }, - "babel-plugin-module-resolver": { - "builtin": { - "fs": true, - "path": true - }, - "globals": { - "console.warn": true, - "process.cwd": true, - "process.env.NODE_ENV": true - }, - "packages": { - "@storybook/test-runner>glob": true, - "babel-plugin-module-resolver>find-babel-config": true, - "babel-plugin-module-resolver>pkg-up": true, - "babel-plugin-module-resolver>reselect": true, - "brfs>resolve": true - } - }, - "babel-plugin-module-resolver>find-babel-config": { - "builtin": { - "fs.readFile": true, - "fs.readFileSync": true, - "path.dirname": true, - "path.isAbsolute": true, - "path.join": true - }, - "globals": { - "process.cwd": true - }, - "packages": { - "depcheck>json5": true, - "nyc>find-up>path-exists": true - } - }, - "babel-plugin-module-resolver>pkg-up": { - "packages": { - "babel-plugin-module-resolver>pkg-up>find-up": true - } - }, - "babel-plugin-module-resolver>pkg-up>find-up": { - "builtin": { - "path.dirname": true, - "path.join": true, - "path.parse": true, - "path.resolve": true - }, - "packages": { - "babel-plugin-module-resolver>pkg-up>find-up>locate-path": true - } - }, - "babel-plugin-module-resolver>pkg-up>find-up>locate-path": { - "builtin": { - "path.resolve": true - }, - "globals": { - "process.cwd": true - }, - "packages": { - "babel-plugin-module-resolver>pkg-up>find-up>locate-path>p-locate": true, - "babel-plugin-module-resolver>pkg-up>find-up>locate-path>path-exists": true - } - }, - "babel-plugin-module-resolver>pkg-up>find-up>locate-path>p-locate": { - "packages": { - "babel-plugin-module-resolver>pkg-up>find-up>locate-path>p-locate>p-limit": true - } - }, - "babel-plugin-module-resolver>pkg-up>find-up>locate-path>p-locate>p-limit": { - "packages": { - "nyc>find-up>locate-path>p-locate>p-limit>p-try": true - } - }, - "babel-plugin-module-resolver>pkg-up>find-up>locate-path>path-exists": { - "builtin": { - "fs.access": true, - "fs.accessSync": true - } - }, "babelify": { "builtin": { "path.extname": true, From 40ecf3c0bf06f663531af9165bf3da588acfe399 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 21 Sep 2023 18:06:52 +0200 Subject: [PATCH 4/9] Bump missed package --- lavamoat/browserify/beta/policy.json | 160 +++++++++++++++++------- lavamoat/browserify/desktop/policy.json | 61 +-------- lavamoat/browserify/flask/policy.json | 61 +-------- lavamoat/browserify/main/policy.json | 61 +-------- lavamoat/browserify/mmi/policy.json | 61 +-------- package.json | 2 +- yarn.lock | 153 +--------------------- 7 files changed, 136 insertions(+), 423 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 0dd6241e4aa9..ec2023305ca3 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1475,6 +1475,29 @@ "jest-canvas-mock>moo-color>color-name": true } }, + "@metamask/key-tree": { + "packages": { + "@metamask/key-tree>@metamask/utils": true, + "@metamask/key-tree>@noble/ed25519": true, + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@noble/secp256k1": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/scure-bip39": true + } + }, + "@metamask/key-tree>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/key-tree>@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true, + "superstruct": true + } + }, "@metamask/key-tree>@noble/ed25519": { "globals": { "crypto": true @@ -1830,14 +1853,12 @@ }, "@metamask/rpc-methods": { "packages": { - "@metamask/browser-passworder": true, + "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/snaps-ui": true, - "@metamask/rpc-methods>@metamask/snaps-utils": true, "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/rpc-methods>nanoid": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } @@ -1847,45 +1868,6 @@ "crypto.getRandomValues": true } }, - "@metamask/rpc-methods>@metamask/key-tree": { - "packages": { - "@metamask/key-tree>@noble/ed25519": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/scure-bip39": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-ui": { - "packages": { - "@metamask/rpc-methods>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-utils": { - "globals": { - "TextDecoder": true, - "URL": true, - "console.error": true, - "console.log": true, - "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/snaps-utils>cron-parser": true, - "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/snaps-utils>rfdc": true, - "@metamask/snaps-utils>validate-npm-package-name": true, - "semver": true, - "superstruct": true - } - }, "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, @@ -1988,12 +1970,86 @@ "crypto.getRandomValues": true } }, + "@metamask/snaps-ui": { + "packages": { + "@metamask/snaps-ui>@metamask/utils": true, + "superstruct": true + } + }, + "@metamask/snaps-ui>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/key-tree>@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true, + "superstruct": true + } + }, + "@metamask/snaps-utils": { + "globals": { + "TextDecoder": true, + "URL": true, + "console.error": true, + "console.log": true, + "console.warn": true, + "document.body.appendChild": true, + "document.createElement": true + }, + "packages": { + "@metamask/key-tree": true, + "@metamask/key-tree>@noble/hashes": true, + "@metamask/key-tree>@scure/base": true, + "@metamask/snaps-utils>@metamask/utils": true, + "@metamask/snaps-utils>cron-parser": true, + "@metamask/snaps-utils>fast-json-stable-stringify": true, + "@metamask/snaps-utils>is-svg": true, + "@metamask/snaps-utils>rfdc": true, + "@metamask/snaps-utils>validate-npm-package-name": true, + "browserify>buffer": true, + "browserify>path-browserify": true, + "browserify>process": true, + "chalk": true, + "semver": true, + "superstruct": true + } + }, + "@metamask/snaps-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/key-tree>@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true, + "superstruct": true + } + }, "@metamask/snaps-utils>cron-parser": { "packages": { "browserify>browser-resolve": true, "luxon": true } }, + "@metamask/snaps-utils>is-svg": { + "packages": { + "@metamask/snaps-utils>is-svg>fast-xml-parser": true + } + }, + "@metamask/snaps-utils>is-svg>fast-xml-parser": { + "globals": { + "entityName": true, + "val": true + }, + "packages": { + "@metamask/snaps-utils>is-svg>fast-xml-parser>strnum": true + } + }, "@metamask/snaps-utils>rfdc": { "packages": { "browserify>buffer": true @@ -3097,6 +3153,22 @@ "document.createElement": true } }, + "chalk": { + "packages": { + "chalk>ansi-styles": true, + "chalk>supports-color": true + } + }, + "chalk>ansi-styles": { + "packages": { + "chalk>ansi-styles>color-convert": true + } + }, + "chalk>ansi-styles>color-convert": { + "packages": { + "jest-canvas-mock>moo-color>color-name": true + } + }, "classnames": { "globals": { "classNames": "write", diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json index 173f8a035c25..df6a7e5453e6 100644 --- a/lavamoat/browserify/desktop/policy.json +++ b/lavamoat/browserify/desktop/policy.json @@ -2038,14 +2038,12 @@ }, "@metamask/rpc-methods": { "packages": { - "@metamask/browser-passworder": true, + "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/snaps-ui": true, - "@metamask/rpc-methods>@metamask/snaps-utils": true, "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/rpc-methods>nanoid": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } @@ -2055,45 +2053,6 @@ "crypto.getRandomValues": true } }, - "@metamask/rpc-methods>@metamask/key-tree": { - "packages": { - "@metamask/key-tree>@noble/ed25519": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/scure-bip39": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-ui": { - "packages": { - "@metamask/rpc-methods>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-utils": { - "globals": { - "TextDecoder": true, - "URL": true, - "console.error": true, - "console.log": true, - "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/snaps-utils>cron-parser": true, - "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/snaps-utils>rfdc": true, - "@metamask/snaps-utils>validate-npm-package-name": true, - "semver": true, - "superstruct": true - } - }, "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2200,8 +2159,8 @@ "@metamask/base-controller": true, "@metamask/permission-controller": true, "@metamask/providers>@metamask/object-multiplex": true, + "@metamask/rpc-methods": true, "@metamask/snaps-controllers>@metamask/post-message-stream": true, - "@metamask/snaps-controllers>@metamask/rpc-methods": true, "@metamask/snaps-controllers>@metamask/snaps-registry": true, "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, @@ -2250,18 +2209,6 @@ "superstruct": true } }, - "@metamask/snaps-controllers>@metamask/rpc-methods": { - "packages": { - "@metamask/key-tree": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/permission-controller": true, - "@metamask/snaps-controllers>@metamask/utils": true, - "@metamask/snaps-ui": true, - "@metamask/snaps-utils": true, - "eth-rpc-errors": true, - "superstruct": true - } - }, "@metamask/snaps-controllers>@metamask/snaps-registry": { "packages": { "@metamask/key-tree>@noble/secp256k1": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 1ca7cfa472da..81b2b14e6981 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -2054,14 +2054,12 @@ }, "@metamask/rpc-methods": { "packages": { - "@metamask/browser-passworder": true, + "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/snaps-ui": true, - "@metamask/rpc-methods>@metamask/snaps-utils": true, "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/rpc-methods>nanoid": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } @@ -2071,45 +2069,6 @@ "crypto.getRandomValues": true } }, - "@metamask/rpc-methods>@metamask/key-tree": { - "packages": { - "@metamask/key-tree>@noble/ed25519": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/scure-bip39": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-ui": { - "packages": { - "@metamask/rpc-methods>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-utils": { - "globals": { - "TextDecoder": true, - "URL": true, - "console.error": true, - "console.log": true, - "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/snaps-utils>cron-parser": true, - "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/snaps-utils>rfdc": true, - "@metamask/snaps-utils>validate-npm-package-name": true, - "semver": true, - "superstruct": true - } - }, "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2216,8 +2175,8 @@ "@metamask/base-controller": true, "@metamask/permission-controller": true, "@metamask/providers>@metamask/object-multiplex": true, + "@metamask/rpc-methods": true, "@metamask/snaps-controllers>@metamask/post-message-stream": true, - "@metamask/snaps-controllers>@metamask/rpc-methods": true, "@metamask/snaps-controllers>@metamask/snaps-registry": true, "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, @@ -2266,18 +2225,6 @@ "superstruct": true } }, - "@metamask/snaps-controllers>@metamask/rpc-methods": { - "packages": { - "@metamask/key-tree": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/permission-controller": true, - "@metamask/snaps-controllers>@metamask/utils": true, - "@metamask/snaps-ui": true, - "@metamask/snaps-utils": true, - "eth-rpc-errors": true, - "superstruct": true - } - }, "@metamask/snaps-controllers>@metamask/snaps-registry": { "packages": { "@metamask/key-tree>@noble/secp256k1": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index f9d6130cb7cc..ed64758dd728 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1879,14 +1879,12 @@ }, "@metamask/rpc-methods": { "packages": { - "@metamask/browser-passworder": true, + "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/snaps-ui": true, - "@metamask/rpc-methods>@metamask/snaps-utils": true, "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/rpc-methods>nanoid": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } @@ -1896,45 +1894,6 @@ "crypto.getRandomValues": true } }, - "@metamask/rpc-methods>@metamask/key-tree": { - "packages": { - "@metamask/key-tree>@noble/ed25519": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/scure-bip39": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-ui": { - "packages": { - "@metamask/rpc-methods>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-utils": { - "globals": { - "TextDecoder": true, - "URL": true, - "console.error": true, - "console.log": true, - "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/snaps-utils>cron-parser": true, - "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/snaps-utils>rfdc": true, - "@metamask/snaps-utils>validate-npm-package-name": true, - "semver": true, - "superstruct": true - } - }, "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2041,8 +2000,8 @@ "@metamask/base-controller": true, "@metamask/permission-controller": true, "@metamask/providers>@metamask/object-multiplex": true, + "@metamask/rpc-methods": true, "@metamask/snaps-controllers>@metamask/post-message-stream": true, - "@metamask/snaps-controllers>@metamask/rpc-methods": true, "@metamask/snaps-controllers>@metamask/snaps-registry": true, "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, @@ -2091,18 +2050,6 @@ "superstruct": true } }, - "@metamask/snaps-controllers>@metamask/rpc-methods": { - "packages": { - "@metamask/key-tree": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/permission-controller": true, - "@metamask/snaps-controllers>@metamask/utils": true, - "@metamask/snaps-ui": true, - "@metamask/snaps-utils": true, - "eth-rpc-errors": true, - "superstruct": true - } - }, "@metamask/snaps-controllers>@metamask/snaps-registry": { "packages": { "@metamask/key-tree>@noble/secp256k1": true, diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 853e885d1f2c..9a4c66219e4b 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -2019,14 +2019,12 @@ }, "@metamask/rpc-methods": { "packages": { - "@metamask/browser-passworder": true, + "@metamask/key-tree": true, "@metamask/key-tree>@noble/hashes": true, "@metamask/permission-controller": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/snaps-ui": true, - "@metamask/rpc-methods>@metamask/snaps-utils": true, "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/rpc-methods>nanoid": true, + "@metamask/snaps-ui": true, + "@metamask/snaps-utils": true, "eth-rpc-errors": true, "superstruct": true } @@ -2036,45 +2034,6 @@ "crypto.getRandomValues": true } }, - "@metamask/rpc-methods>@metamask/key-tree": { - "packages": { - "@metamask/key-tree>@noble/ed25519": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@noble/secp256k1": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/scure-bip39": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-ui": { - "packages": { - "@metamask/rpc-methods>@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/rpc-methods>@metamask/snaps-utils": { - "globals": { - "TextDecoder": true, - "URL": true, - "console.error": true, - "console.log": true, - "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true - }, - "packages": { - "@metamask/key-tree>@noble/hashes": true, - "@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/utils": true, - "@metamask/snaps-utils>cron-parser": true, - "@metamask/snaps-utils>fast-json-stable-stringify": true, - "@metamask/snaps-utils>rfdc": true, - "@metamask/snaps-utils>validate-npm-package-name": true, - "semver": true, - "superstruct": true - } - }, "@metamask/rpc-methods>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2181,8 +2140,8 @@ "@metamask/base-controller": true, "@metamask/permission-controller": true, "@metamask/providers>@metamask/object-multiplex": true, + "@metamask/rpc-methods": true, "@metamask/snaps-controllers>@metamask/post-message-stream": true, - "@metamask/snaps-controllers>@metamask/rpc-methods": true, "@metamask/snaps-controllers>@metamask/snaps-registry": true, "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, @@ -2231,18 +2190,6 @@ "superstruct": true } }, - "@metamask/snaps-controllers>@metamask/rpc-methods": { - "packages": { - "@metamask/key-tree": true, - "@metamask/key-tree>@noble/hashes": true, - "@metamask/permission-controller": true, - "@metamask/snaps-controllers>@metamask/utils": true, - "@metamask/snaps-ui": true, - "@metamask/snaps-utils": true, - "eth-rpc-errors": true, - "superstruct": true - } - }, "@metamask/snaps-controllers>@metamask/snaps-registry": { "packages": { "@metamask/key-tree>@noble/secp256k1": true, diff --git a/package.json b/package.json index 903c545ac67e..bc22049015ee 100644 --- a/package.json +++ b/package.json @@ -269,7 +269,7 @@ "@metamask/ppom-validator": "^0.5.0", "@metamask/providers": "^11.1.0", "@metamask/rate-limit-controller": "^3.0.0", - "@metamask/rpc-methods": "^1.0.2", + "@metamask/rpc-methods": "^2.0.0", "@metamask/safe-event-emitter": "^2.0.0", "@metamask/scure-bip39": "^2.0.3", "@metamask/selected-network-controller": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index d91aa58bb017..c4a17e18af7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4278,20 +4278,6 @@ __metadata: languageName: node linkType: hard -"@metamask/key-tree@npm:^7.1.1": - version: 7.1.1 - resolution: "@metamask/key-tree@npm:7.1.1" - dependencies: - "@metamask/scure-bip39": "npm:^2.1.0" - "@metamask/utils": "npm:^6.0.1" - "@noble/ed25519": "npm:^1.6.0" - "@noble/hashes": "npm:^1.0.0" - "@noble/secp256k1": "npm:^1.5.5" - "@scure/base": "npm:^1.0.0" - checksum: 7e48c3c2c88cf0c451c9d45b70af5bbad585d0d224dff11a5e0e80430e7d3abe584fa0d42875486c1f3144d6b366ff08b13be7638c4c47cb26ee67775699d017 - languageName: node - linkType: hard - "@metamask/key-tree@npm:^9.0.0": version: 9.0.0 resolution: "@metamask/key-tree@npm:9.0.0" @@ -4628,26 +4614,6 @@ __metadata: languageName: node linkType: hard -"@metamask/providers@npm:^10.2.1": - version: 10.2.1 - resolution: "@metamask/providers@npm:10.2.1" - dependencies: - "@metamask/object-multiplex": "npm:^1.1.0" - "@metamask/safe-event-emitter": "npm:^2.0.0" - "@types/chrome": "npm:^0.0.136" - detect-browser: "npm:^5.2.0" - eth-rpc-errors: "npm:^4.0.2" - extension-port-stream: "npm:^2.0.1" - fast-deep-equal: "npm:^2.0.1" - is-stream: "npm:^2.0.0" - json-rpc-engine: "npm:^6.1.0" - json-rpc-middleware-stream: "npm:^4.2.1" - pump: "npm:^3.0.0" - webextension-polyfill-ts: "npm:^0.25.0" - checksum: b8784ee9ae3f740c43dc8079754886be15249aa1b4e65dd969a5ddb067745c068a45bb329b6b343f34d7629002d771a74a873599dad89f140413ff2a95cdbffb - languageName: node - linkType: hard - "@metamask/providers@npm:^11.1.0, @metamask/providers@npm:^11.1.1": version: 11.1.2 resolution: "@metamask/providers@npm:11.1.2" @@ -4735,25 +4701,6 @@ __metadata: languageName: node linkType: hard -"@metamask/rpc-methods@npm:^1.0.2": - version: 1.0.2 - resolution: "@metamask/rpc-methods@npm:1.0.2" - dependencies: - "@metamask/browser-passworder": "npm:^4.0.2" - "@metamask/key-tree": "npm:^7.1.1" - "@metamask/permission-controller": "npm:^4.0.0" - "@metamask/snaps-ui": "npm:^1.0.2" - "@metamask/snaps-utils": "npm:^1.0.2" - "@metamask/types": "npm:^1.1.0" - "@metamask/utils": "npm:^6.0.1" - "@noble/hashes": "npm:^1.1.3" - eth-rpc-errors: "npm:^4.0.2" - nanoid: "npm:^3.1.31" - superstruct: "npm:^1.0.3" - checksum: 337d506e560392ccc471c716d3f3c527c01d01968e36623527585270c1874412d22055340d485952b887df1f9ca8e8ac28708e09fbf6781a7215d5b97aeb8724 - languageName: node - linkType: hard - "@metamask/rpc-methods@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/rpc-methods@npm:2.0.0" @@ -4996,16 +4943,6 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-ui@npm:^1.0.2": - version: 1.0.2 - resolution: "@metamask/snaps-ui@npm:1.0.2" - dependencies: - "@metamask/utils": "npm:^6.0.1" - superstruct: "npm:^1.0.3" - checksum: 2c2eeb252f30670f4598338ea40fe0b430b054b606f341ed89e0cd1734395d132a861eb7677935e5a6fa0b85996c3c1f4eb773c02678cc736cc5f13433eb402a - languageName: node - linkType: hard - "@metamask/snaps-ui@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/snaps-ui@npm:2.0.0" @@ -5045,34 +4982,6 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-utils@npm:^1.0.2": - version: 1.0.2 - resolution: "@metamask/snaps-utils@npm:1.0.2" - dependencies: - "@babel/core": "npm:^7.18.6" - "@babel/types": "npm:^7.18.7" - "@metamask/base-controller": "npm:^3.0.0" - "@metamask/key-tree": "npm:^7.1.1" - "@metamask/permission-controller": "npm:^4.0.0" - "@metamask/providers": "npm:^10.2.1" - "@metamask/snaps-registry": "npm:^1.2.1" - "@metamask/snaps-ui": "npm:^1.0.2" - "@metamask/utils": "npm:^6.0.1" - "@noble/hashes": "npm:^1.1.3" - "@scure/base": "npm:^1.1.1" - cron-parser: "npm:^4.5.0" - eth-rpc-errors: "npm:^4.0.3" - fast-deep-equal: "npm:^3.1.3" - fast-json-stable-stringify: "npm:^2.1.0" - rfdc: "npm:^1.3.0" - semver: "npm:^7.5.4" - ses: "npm:^0.18.7" - superstruct: "npm:^1.0.3" - validate-npm-package-name: "npm:^5.0.0" - checksum: 0f8663c1ef2894b06829a507e0ea0a724615ac256476b28c21cd060531101e0428fd0c7563aeafff795751c4641043ec50445d54138f5514bfd211723b20a80f - languageName: node - linkType: hard - "@metamask/snaps-utils@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/snaps-utils@npm:2.0.0" @@ -5277,7 +5186,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.1.3, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": +"@noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": version: 1.3.2 resolution: "@noble/hashes@npm:1.3.2" checksum: 685f59d2d44d88e738114b71011d343a9f7dce9dfb0a121f1489132f9247baa60bc985e5ec6f3213d114fbd1e1168e7294644e46cbd0ce2eba37994f28eeb51b @@ -7644,16 +7553,6 @@ __metadata: languageName: node linkType: hard -"@types/chrome@npm:^0.0.136": - version: 0.0.136 - resolution: "@types/chrome@npm:0.0.136" - dependencies: - "@types/filesystem": "npm:*" - "@types/har-format": "npm:*" - checksum: 4de30c5bd3eec7aba4c110985779ba179a4a433a68ef4d5e96289d8aca4318cf9c206f0c9fced020e1a498e32f0fc4942d9209424c66905e7b43983b38b680c0 - languageName: node - linkType: hard - "@types/color-name@npm:^1.1.1": version: 1.1.1 resolution: "@types/color-name@npm:1.1.1" @@ -7809,22 +7708,6 @@ __metadata: languageName: node linkType: hard -"@types/filesystem@npm:*": - version: 0.0.30 - resolution: "@types/filesystem@npm:0.0.30" - dependencies: - "@types/filewriter": "npm:*" - checksum: ccbce5af7b2d0a58d23b05a6f2c19321983918e581a682baeea22233ebd637ebe6b0e890c7d0860c04990a1a3367818cff6f312e10b37f474dceeeb599b44a14 - languageName: node - linkType: hard - -"@types/filewriter@npm:*": - version: 0.0.29 - resolution: "@types/filewriter@npm:0.0.29" - checksum: bbad0faade291f375f670fff7e95a9eab6bd67315c978f31ce3bb047be418fcc2d9c56b6eeebd1599d7128f0faa43ae3f5f709e6f53d2130eb022fbe32d63c1e - languageName: node - linkType: hard - "@types/find-cache-dir@npm:^3.2.1": version: 3.2.1 resolution: "@types/find-cache-dir@npm:3.2.1" @@ -7920,13 +7803,6 @@ __metadata: languageName: node linkType: hard -"@types/har-format@npm:*": - version: 1.2.5 - resolution: "@types/har-format@npm:1.2.5" - checksum: 33206883b6b59f5638eaaeae1e728cd2877a075d2fdc5435f9d3ddaef4ac463d446c5a7ff6b44abc8080b428a4bdaff10dc7c0d7e83363774c12c0f77b2cc73d - languageName: node - linkType: hard - "@types/hast@npm:^2.0.0": version: 2.3.1 resolution: "@types/hast@npm:2.3.1" @@ -16757,7 +16633,7 @@ __metadata: languageName: node linkType: hard -"extension-port-stream@npm:^2.0.0, extension-port-stream@npm:^2.0.1, extension-port-stream@npm:^2.1.1": +"extension-port-stream@npm:^2.0.0, extension-port-stream@npm:^2.1.1": version: 2.1.1 resolution: "extension-port-stream@npm:2.1.1" dependencies: @@ -16863,13 +16739,6 @@ __metadata: languageName: node linkType: hard -"fast-deep-equal@npm:^2.0.1": - version: 2.0.1 - resolution: "fast-deep-equal@npm:2.0.1" - checksum: b701835a87985e0ec4925bdf1f0c1e7eb56309b5d12d534d5b4b69d95a54d65bb16861c081781ead55f73f12d6c60ba668713391ee7fbf6b0567026f579b7b0b - languageName: node - linkType: hard - "fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": version: 3.1.3 resolution: "fast-deep-equal@npm:3.1.3" @@ -24167,7 +24036,7 @@ __metadata: "@metamask/ppom-validator": "npm:^0.5.0" "@metamask/providers": "npm:^11.1.0" "@metamask/rate-limit-controller": "npm:^3.0.0" - "@metamask/rpc-methods": "npm:^1.0.2" + "@metamask/rpc-methods": "npm:^2.0.0" "@metamask/safe-event-emitter": "npm:^2.0.0" "@metamask/scure-bip39": "npm:^2.0.3" "@metamask/selected-network-controller": "npm:^1.0.0" @@ -34600,15 +34469,6 @@ __metadata: languageName: node linkType: hard -"webextension-polyfill-ts@npm:^0.25.0": - version: 0.25.0 - resolution: "webextension-polyfill-ts@npm:0.25.0" - dependencies: - webextension-polyfill: "npm:^0.7.0" - checksum: 33260014ffda174348ec2f8271dd4312f5ba6286fdc6f014b87194361fda7d0b10a4b168a7eb2a62525785cc28ef4080ac5cba20179041ba642e039bb49aee0e - languageName: node - linkType: hard - "webextension-polyfill@npm:>=0.10.0 <1.0, webextension-polyfill@npm:^0.10.0": version: 0.10.0 resolution: "webextension-polyfill@npm:0.10.0" @@ -34616,13 +34476,6 @@ __metadata: languageName: node linkType: hard -"webextension-polyfill@npm:^0.7.0": - version: 0.7.0 - resolution: "webextension-polyfill@npm:0.7.0" - checksum: 693a4d89705284e668ad501afe44a6f99dac6b5259ed6a57c559e6e8da827dfd449755ff367ee6c55cd4af7dead0fd7eb70b2b8ac938d191e6082f3fb7c211b6 - languageName: node - linkType: hard - "webextension-polyfill@npm:^0.8.0": version: 0.8.0 resolution: "webextension-polyfill@npm:0.8.0" From eccdca1ab094e2570170c01aae5733bb815c06ab Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 21 Sep 2023 18:10:55 +0200 Subject: [PATCH 5/9] Fix tests --- .../permissions/specifications.test.js | 4 +- shared/constants/permissions.test.js | 39 ++----------------- shared/constants/snaps/permissions.ts | 1 + 3 files changed, 6 insertions(+), 38 deletions(-) diff --git a/app/scripts/controllers/permissions/specifications.test.js b/app/scripts/controllers/permissions/specifications.test.js index f716ddaba269..892ee3cadaec 100644 --- a/app/scripts/controllers/permissions/specifications.test.js +++ b/app/scripts/controllers/permissions/specifications.test.js @@ -27,8 +27,8 @@ describe('PermissionController specifications', () => { expect(caveatSpecifications.permittedCoinTypes.type).toStrictEqual( SnapCaveatType.PermittedCoinTypes, ); - expect(caveatSpecifications.snapKeyring.type).toStrictEqual( - SnapCaveatType.SnapKeyring, + expect(caveatSpecifications.chainIds.type).toStrictEqual( + SnapCaveatType.ChainIds, ); expect(caveatSpecifications.snapCronjob.type).toStrictEqual( SnapCaveatType.SnapCronjob, diff --git a/shared/constants/permissions.test.js b/shared/constants/permissions.test.js index 0bc4e9cc37db..2230e128b58b 100644 --- a/shared/constants/permissions.test.js +++ b/shared/constants/permissions.test.js @@ -3,7 +3,6 @@ import { restrictedMethodPermissionBuilders } from '@metamask/rpc-methods'; import { EndowmentPermissions, ExcludedSnapEndowments, - ExcludedSnapPermissions, RestrictedMethods, } from './permissions'; @@ -24,46 +23,14 @@ describe('EndowmentPermissions', () => { }); }); -const FlaskOnlyPermissions = ['snap_manageAccounts', 'snap_getLocale']; - +// This test is flawed because it doesn't take fencing into consideration +// TODO: Figure out a better way to test this describe('RestrictedMethods', () => { it('has the expected permission keys', () => { - // this is done because we there is a difference between flask and stable permissions - // the code fence in `shared/constants/snaps/permissions.ts` is not supported in jest - const mainBuildRestrictedMethodPermissions = Object.keys(RestrictedMethods) - .filter((key) => !FlaskOnlyPermissions.includes(key)) - .sort(); - - expect(mainBuildRestrictedMethodPermissions).toStrictEqual( - [ - 'eth_accounts', - ...Object.keys(restrictedMethodPermissionBuilders).filter( - (targetName) => - !Object.keys(ExcludedSnapPermissions).includes(targetName), - ), - ].sort(), - ); - }); -}); - -// Kept here because code fences are not supported in jest. -// rpc methods flask has more restricted endowment permission builders -jest.mock('@metamask/rpc-methods', () => - jest.requireActual('@metamask/rpc-methods-flask'), -); - -describe('Flask Restricted Methods', () => { - it('has the expected flask permission keys', () => { - const flaskExcludedSnapPermissions = Object.keys( - ExcludedSnapPermissions, - ).filter((key) => !FlaskOnlyPermissions.includes(key)); - expect(Object.keys(RestrictedMethods).sort()).toStrictEqual( [ 'eth_accounts', - ...Object.keys(restrictedMethodPermissionBuilders).filter( - (targetName) => !flaskExcludedSnapPermissions.includes(targetName), - ), + ...Object.keys(restrictedMethodPermissionBuilders), ].sort(), ); }); diff --git a/shared/constants/snaps/permissions.ts b/shared/constants/snaps/permissions.ts index d5e1b16c6d4f..ddb72f8b7ae1 100644 --- a/shared/constants/snaps/permissions.ts +++ b/shared/constants/snaps/permissions.ts @@ -8,6 +8,7 @@ export const EndowmentPermissions = Object.freeze({ ///: BEGIN:ONLY_INCLUDE_IN(build-flask) 'endowment:long-running': 'endowment:long-running', 'endowment:lifecycle-hooks': 'endowment:lifecycle-hooks', + 'endowment:name-lookup': 'endowment:name-lookup', ///: END:ONLY_INCLUDE_IN } as const); From 31ced4daefa7b0b5b358eb9ccdd1d9783db95e90 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 21 Sep 2023 18:23:24 +0200 Subject: [PATCH 6/9] Re-enable an E2E in stable --- test/e2e/run-all.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e/run-all.js b/test/e2e/run-all.js index 5065da716d62..6c2811b1506f 100644 --- a/test/e2e/run-all.js +++ b/test/e2e/run-all.js @@ -131,7 +131,6 @@ async function main() { const filteredTests = [ 'settings-add-snap-account-toggle.spec.js', 'test-snap-manageAccount.spec.js', - 'test-snap-rpc.spec.js', 'test-snap-lifecycle.spec.js', 'ppom-toggle-settings.spec.js', 'petnames.spec.js', From 37fbf21d8baf7e13d7684e9df3c6316f0362fd01 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Fri, 22 Sep 2023 13:48:25 +0200 Subject: [PATCH 7/9] Exclude name lookup for now --- shared/constants/snaps/permissions.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/constants/snaps/permissions.ts b/shared/constants/snaps/permissions.ts index ddb72f8b7ae1..0206061f7ba0 100644 --- a/shared/constants/snaps/permissions.ts +++ b/shared/constants/snaps/permissions.ts @@ -26,6 +26,9 @@ export const ExcludedSnapPermissions = Object.freeze({ }); export const ExcludedSnapEndowments = Object.freeze({ + // Move to below fence once implemented + 'endowment:name-lookup': + 'This permission is still in development and therefore not available.', ///: BEGIN:ONLY_INCLUDE_IN(build-main) 'endowment:keyring': 'This endowment is still in development therefore not available.', From fea7364916c3679860e0cb6240a9c412f0e1496d Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Fri, 22 Sep 2023 13:55:04 +0200 Subject: [PATCH 8/9] Fix test --- shared/constants/permissions.test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/constants/permissions.test.js b/shared/constants/permissions.test.js index 2230e128b58b..fc029f1c3b30 100644 --- a/shared/constants/permissions.test.js +++ b/shared/constants/permissions.test.js @@ -14,6 +14,7 @@ describe('EndowmentPermissions', () => { [ 'endowment:long-running', 'endowment:lifecycle-hooks', + 'endowment:name-lookup', ...Object.keys(endowmentPermissionBuilders).filter( (targetName) => !Object.keys(ExcludedSnapEndowments).includes(targetName), From 72c287268d052b0105b79b8cf9772f15405abdf4 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Mon, 25 Sep 2023 10:33:30 +0200 Subject: [PATCH 9/9] Update MMI url --- builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builds.yml b/builds.yml index f62380e8e730..e0f4858227f7 100644 --- a/builds.yml +++ b/builds.yml @@ -96,7 +96,7 @@ buildTypes: - SEGMENT_WRITE_KEY_REF: SEGMENT_MMI_WRITE_KEY - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/1.0.2/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.consensys.io/2.0.0/index.html - MMI_CONFIGURATION_SERVICE_URL: https://configuration.metamask-institutional.io/v2/configuration/default - SUPPORT_LINK: https://mmi-support.zendesk.com/hc/en-us - SUPPORT_REQUEST_LINK: https://mmi-support.zendesk.com/hc/en-us/requests/new