From 94170edba647b20bc2b5177feada4901b0e0208d Mon Sep 17 00:00:00 2001 From: Michele Esposito Date: Tue, 18 Jul 2023 23:46:00 +0200 Subject: [PATCH 1/6] refactor: use patched @metamask/keyring-controller --- ...ring-controller-npm-7.0.0-962008b200.patch | 45 ++++ app/scripts/metamask-controller.js | 36 +++- lavamoat/browserify/beta/policy.json | 193 ++++++++++++------ lavamoat/browserify/desktop/policy.json | 193 ++++++++++++------ lavamoat/browserify/flask/policy.json | 193 ++++++++++++------ lavamoat/browserify/main/policy.json | 193 ++++++++++++------ lavamoat/browserify/mmi/policy.json | 193 ++++++++++++------ lavamoat/build-system/policy.json | 55 +++++ package.json | 2 + yarn.lock | 154 ++++++++------ 10 files changed, 911 insertions(+), 346 deletions(-) create mode 100644 .yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch diff --git a/.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch b/.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch new file mode 100644 index 000000000000..be356a5ff430 --- /dev/null +++ b/.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch @@ -0,0 +1,45 @@ +diff --git a/dist/KeyringController.d.ts b/dist/KeyringController.d.ts +index 82de83a7bb1ad14bb23f3b6274e0c4d5bb773382..35ec924d1530eb944c77c9605a1fb1dda58ebcaf 100644 +--- a/dist/KeyringController.d.ts ++++ b/dist/KeyringController.d.ts +@@ -1,10 +1,10 @@ + import type { TxData, TypedTransaction } from '@ethereumjs/tx'; +-import { type MetaMaskKeyring as QRKeyring, type IKeyringState as IQRKeyringState } from '@keystonehq/metamask-airgapped-keyring'; ++import type { MetaMaskKeyring as QRKeyring, IKeyringState as IQRKeyringState } from '@keystonehq/metamask-airgapped-keyring'; + import type { RestrictedControllerMessenger } from '@metamask/base-controller'; + import { BaseControllerV2 } from '@metamask/base-controller'; + import type { PersonalMessageParams, TypedMessageParams } from '@metamask/message-manager'; + import type { PreferencesController } from '@metamask/preferences-controller'; +-import { type Hex, type Keyring, type Json } from '@metamask/utils'; ++import type { Hex, Keyring, Json } from '@metamask/utils'; + import type { Patch } from 'immer'; + declare const name = "KeyringController"; + /** +@@ -135,6 +135,10 @@ export declare class KeyringController extends BaseControllerV2 this._onKeyringControllerUpdate(state), ); diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 0ac70c31e4a4..6bc976794117 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -138,7 +138,6 @@ "@ethereumjs/tx": { "packages": { "@ethereumjs/common": true, - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -146,21 +145,6 @@ "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true, - "browserify>buffer": true - } - }, - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/as-sha256": true, - "@metamask/key-tree>@noble/hashes": true - } - }, "@ethereumjs/tx>@ethereumjs/rlp": { "globals": { "TextEncoder": true @@ -171,7 +155,6 @@ "console.warn": true }, "packages": { - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -1105,7 +1088,6 @@ }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "packages": { - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "bn.js": true, "browserify>assert": true, "browserify>buffer": true, @@ -1116,14 +1098,6 @@ "ganache>secp256k1>elliptic": true } }, - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "@metamask/eth-ledger-bridge-keyring>hdkey": { "packages": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, @@ -1146,7 +1120,7 @@ "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1154,6 +1128,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/eth-token-tracker": { "globals": { "console.warn": true @@ -1524,6 +1513,102 @@ "TextEncoder": true } }, + "@metamask/keyring-controller": { + "packages": { + "@metamask/base-controller": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/keyring-controller>ethereumjs-wallet": true, + "eth-json-rpc-filters>async-mutex": true, + "ethereumjs-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": { + "globals": { + "console.error": true + }, + "packages": { + "@metamask/browser-passworder": true, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/obs-store": true, + "browserify>events": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": { + "packages": { + "@ethereumjs/tx>@ethereumjs/util": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true, + "bn.js": true, + "browserify>buffer": true, + "eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-sig-util>tweetnacl": true, + "eth-sig-util>tweetnacl-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/keyring-controller>@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/keyring-controller>ethereumjs-wallet": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true, + "@truffle/codec>utf8": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>ethereum-cryptography>scrypt-js": true, + "ethereumjs-wallet>aes-js": true, + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "uuid": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": true, + "browserify>assert": true, + "browserify>buffer": true, + "browserify>insert-module-globals>is-buffer": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>rlp": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": { + "globals": { + "Buffer": true + }, + "packages": { + "browserify>browser-resolve": true + } + }, "@metamask/logo": { "globals": { "addEventListener": true, @@ -1553,7 +1638,7 @@ "@metamask/message-manager>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1561,6 +1646,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/message-manager>jsonschema": { "packages": { "browserify>url": true @@ -3296,27 +3396,11 @@ "@ethersproject/providers": true, "browserify>buffer": true, "browserify>insert-module-globals>is-buffer": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": true, + "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true } }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "browserify": true, - "browserify>buffer": true, - "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true - } - }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "browserify": true - } - }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/common>crc-32": true, @@ -3524,20 +3608,11 @@ "browserify>assert": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } }, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-util": { "packages": { "browserify>assert": true, @@ -3608,10 +3683,15 @@ }, "ethereumjs-util>ethereum-cryptography": { "packages": { + "browserify>assert": true, "browserify>buffer": true, + "browserify>crypto-browserify>create-hmac": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>keccak": true, "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "ethereumjs-wallet>safe-buffer": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { @@ -3731,7 +3811,6 @@ "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, - "ethereumjs-wallet>ethereum-cryptography": true, "ganache>secp256k1>elliptic": true } }, @@ -4676,4 +4755,4 @@ } } } -} \ No newline at end of file +} diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json index 4f181ab36329..5c672c5c2362 100644 --- a/lavamoat/browserify/desktop/policy.json +++ b/lavamoat/browserify/desktop/policy.json @@ -138,7 +138,6 @@ "@ethereumjs/tx": { "packages": { "@ethereumjs/common": true, - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -146,21 +145,6 @@ "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true, - "browserify>buffer": true - } - }, - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/as-sha256": true, - "@metamask/key-tree>@noble/hashes": true - } - }, "@ethereumjs/tx>@ethereumjs/rlp": { "globals": { "TextEncoder": true @@ -171,7 +155,6 @@ "console.warn": true }, "packages": { - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -1176,7 +1159,6 @@ }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "packages": { - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "bn.js": true, "browserify>assert": true, "browserify>buffer": true, @@ -1187,14 +1169,6 @@ "ganache>secp256k1>elliptic": true } }, - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "@metamask/eth-ledger-bridge-keyring>hdkey": { "packages": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, @@ -1231,7 +1205,7 @@ "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1239,6 +1213,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/eth-snap-keyring>@metamask/keyring-api": { "packages": { "@metamask/eth-snap-keyring>@metamask/keyring-api>@metamask/utils": true, @@ -1675,6 +1664,102 @@ "TextEncoder": true } }, + "@metamask/keyring-controller": { + "packages": { + "@metamask/base-controller": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/keyring-controller>ethereumjs-wallet": true, + "eth-json-rpc-filters>async-mutex": true, + "ethereumjs-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": { + "globals": { + "console.error": true + }, + "packages": { + "@metamask/browser-passworder": true, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/obs-store": true, + "browserify>events": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": { + "packages": { + "@ethereumjs/tx>@ethereumjs/util": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true, + "bn.js": true, + "browserify>buffer": true, + "eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-sig-util>tweetnacl": true, + "eth-sig-util>tweetnacl-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/keyring-controller>@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/keyring-controller>ethereumjs-wallet": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true, + "@truffle/codec>utf8": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>ethereum-cryptography>scrypt-js": true, + "ethereumjs-wallet>aes-js": true, + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "uuid": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": true, + "browserify>assert": true, + "browserify>buffer": true, + "browserify>insert-module-globals>is-buffer": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>rlp": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": { + "globals": { + "Buffer": true + }, + "packages": { + "browserify>browser-resolve": true + } + }, "@metamask/logo": { "globals": { "addEventListener": true, @@ -1704,7 +1789,7 @@ "@metamask/message-manager>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1712,6 +1797,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/message-manager>jsonschema": { "packages": { "browserify>url": true @@ -3792,27 +3892,11 @@ "@ethersproject/providers": true, "browserify>buffer": true, "browserify>insert-module-globals>is-buffer": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": true, + "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true } }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "browserify": true, - "browserify>buffer": true, - "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true - } - }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "browserify": true - } - }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/common>crc-32": true, @@ -4020,20 +4104,11 @@ "browserify>assert": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } }, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-util": { "packages": { "browserify>assert": true, @@ -4104,10 +4179,15 @@ }, "ethereumjs-util>ethereum-cryptography": { "packages": { + "browserify>assert": true, "browserify>buffer": true, + "browserify>crypto-browserify>create-hmac": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>keccak": true, "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "ethereumjs-wallet>safe-buffer": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { @@ -4227,7 +4307,6 @@ "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, - "ethereumjs-wallet>ethereum-cryptography": true, "ganache>secp256k1>elliptic": true } }, @@ -5314,4 +5393,4 @@ } } } -} \ No newline at end of file +} diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 4f181ab36329..5c672c5c2362 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -138,7 +138,6 @@ "@ethereumjs/tx": { "packages": { "@ethereumjs/common": true, - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -146,21 +145,6 @@ "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true, - "browserify>buffer": true - } - }, - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/as-sha256": true, - "@metamask/key-tree>@noble/hashes": true - } - }, "@ethereumjs/tx>@ethereumjs/rlp": { "globals": { "TextEncoder": true @@ -171,7 +155,6 @@ "console.warn": true }, "packages": { - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -1176,7 +1159,6 @@ }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "packages": { - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "bn.js": true, "browserify>assert": true, "browserify>buffer": true, @@ -1187,14 +1169,6 @@ "ganache>secp256k1>elliptic": true } }, - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "@metamask/eth-ledger-bridge-keyring>hdkey": { "packages": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, @@ -1231,7 +1205,7 @@ "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1239,6 +1213,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/eth-snap-keyring>@metamask/keyring-api": { "packages": { "@metamask/eth-snap-keyring>@metamask/keyring-api>@metamask/utils": true, @@ -1675,6 +1664,102 @@ "TextEncoder": true } }, + "@metamask/keyring-controller": { + "packages": { + "@metamask/base-controller": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/keyring-controller>ethereumjs-wallet": true, + "eth-json-rpc-filters>async-mutex": true, + "ethereumjs-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": { + "globals": { + "console.error": true + }, + "packages": { + "@metamask/browser-passworder": true, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/obs-store": true, + "browserify>events": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": { + "packages": { + "@ethereumjs/tx>@ethereumjs/util": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true, + "bn.js": true, + "browserify>buffer": true, + "eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-sig-util>tweetnacl": true, + "eth-sig-util>tweetnacl-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/keyring-controller>@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/keyring-controller>ethereumjs-wallet": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true, + "@truffle/codec>utf8": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>ethereum-cryptography>scrypt-js": true, + "ethereumjs-wallet>aes-js": true, + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "uuid": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": true, + "browserify>assert": true, + "browserify>buffer": true, + "browserify>insert-module-globals>is-buffer": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>rlp": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": { + "globals": { + "Buffer": true + }, + "packages": { + "browserify>browser-resolve": true + } + }, "@metamask/logo": { "globals": { "addEventListener": true, @@ -1704,7 +1789,7 @@ "@metamask/message-manager>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1712,6 +1797,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/message-manager>jsonschema": { "packages": { "browserify>url": true @@ -3792,27 +3892,11 @@ "@ethersproject/providers": true, "browserify>buffer": true, "browserify>insert-module-globals>is-buffer": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": true, + "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true } }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "browserify": true, - "browserify>buffer": true, - "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true - } - }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "browserify": true - } - }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/common>crc-32": true, @@ -4020,20 +4104,11 @@ "browserify>assert": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } }, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-util": { "packages": { "browserify>assert": true, @@ -4104,10 +4179,15 @@ }, "ethereumjs-util>ethereum-cryptography": { "packages": { + "browserify>assert": true, "browserify>buffer": true, + "browserify>crypto-browserify>create-hmac": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>keccak": true, "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "ethereumjs-wallet>safe-buffer": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { @@ -4227,7 +4307,6 @@ "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, - "ethereumjs-wallet>ethereum-cryptography": true, "ganache>secp256k1>elliptic": true } }, @@ -5314,4 +5393,4 @@ } } } -} \ No newline at end of file +} diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 0ac70c31e4a4..6bc976794117 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -138,7 +138,6 @@ "@ethereumjs/tx": { "packages": { "@ethereumjs/common": true, - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -146,21 +145,6 @@ "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true, - "browserify>buffer": true - } - }, - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/as-sha256": true, - "@metamask/key-tree>@noble/hashes": true - } - }, "@ethereumjs/tx>@ethereumjs/rlp": { "globals": { "TextEncoder": true @@ -171,7 +155,6 @@ "console.warn": true }, "packages": { - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -1105,7 +1088,6 @@ }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "packages": { - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "bn.js": true, "browserify>assert": true, "browserify>buffer": true, @@ -1116,14 +1098,6 @@ "ganache>secp256k1>elliptic": true } }, - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "@metamask/eth-ledger-bridge-keyring>hdkey": { "packages": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, @@ -1146,7 +1120,7 @@ "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1154,6 +1128,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/eth-token-tracker": { "globals": { "console.warn": true @@ -1524,6 +1513,102 @@ "TextEncoder": true } }, + "@metamask/keyring-controller": { + "packages": { + "@metamask/base-controller": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/keyring-controller>ethereumjs-wallet": true, + "eth-json-rpc-filters>async-mutex": true, + "ethereumjs-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": { + "globals": { + "console.error": true + }, + "packages": { + "@metamask/browser-passworder": true, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/obs-store": true, + "browserify>events": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": { + "packages": { + "@ethereumjs/tx>@ethereumjs/util": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true, + "bn.js": true, + "browserify>buffer": true, + "eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-sig-util>tweetnacl": true, + "eth-sig-util>tweetnacl-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/keyring-controller>@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/keyring-controller>ethereumjs-wallet": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true, + "@truffle/codec>utf8": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>ethereum-cryptography>scrypt-js": true, + "ethereumjs-wallet>aes-js": true, + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "uuid": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": true, + "browserify>assert": true, + "browserify>buffer": true, + "browserify>insert-module-globals>is-buffer": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>rlp": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": { + "globals": { + "Buffer": true + }, + "packages": { + "browserify>browser-resolve": true + } + }, "@metamask/logo": { "globals": { "addEventListener": true, @@ -1553,7 +1638,7 @@ "@metamask/message-manager>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1561,6 +1646,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/message-manager>jsonschema": { "packages": { "browserify>url": true @@ -3296,27 +3396,11 @@ "@ethersproject/providers": true, "browserify>buffer": true, "browserify>insert-module-globals>is-buffer": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": true, + "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true } }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "browserify": true, - "browserify>buffer": true, - "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true - } - }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "browserify": true - } - }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/common>crc-32": true, @@ -3524,20 +3608,11 @@ "browserify>assert": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } }, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-util": { "packages": { "browserify>assert": true, @@ -3608,10 +3683,15 @@ }, "ethereumjs-util>ethereum-cryptography": { "packages": { + "browserify>assert": true, "browserify>buffer": true, + "browserify>crypto-browserify>create-hmac": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>keccak": true, "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "ethereumjs-wallet>safe-buffer": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { @@ -3731,7 +3811,6 @@ "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, - "ethereumjs-wallet>ethereum-cryptography": true, "ganache>secp256k1>elliptic": true } }, @@ -4676,4 +4755,4 @@ } } } -} \ No newline at end of file +} diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 5d216d8831f5..68313535017b 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -138,7 +138,6 @@ "@ethereumjs/tx": { "packages": { "@ethereumjs/common": true, - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -146,21 +145,6 @@ "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true, - "browserify>buffer": true - } - }, - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "@ethereumjs/tx>@chainsafe/ssz>@chainsafe/as-sha256": true, - "@metamask/key-tree>@noble/hashes": true - } - }, "@ethereumjs/tx>@ethereumjs/rlp": { "globals": { "TextEncoder": true @@ -171,7 +155,6 @@ "console.warn": true }, "packages": { - "@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/rlp": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, "@ethereumjs/tx>ethereum-cryptography": true, @@ -1333,7 +1316,6 @@ }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "packages": { - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "bn.js": true, "browserify>assert": true, "browserify>buffer": true, @@ -1344,14 +1326,6 @@ "ganache>secp256k1>elliptic": true } }, - "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "@metamask/eth-ledger-bridge-keyring>hdkey": { "packages": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, @@ -1374,7 +1348,7 @@ "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1382,6 +1356,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/eth-token-tracker": { "globals": { "console.warn": true @@ -1752,6 +1741,102 @@ "TextEncoder": true } }, + "@metamask/keyring-controller": { + "packages": { + "@metamask/base-controller": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/keyring-controller>ethereumjs-wallet": true, + "eth-json-rpc-filters>async-mutex": true, + "ethereumjs-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller": { + "globals": { + "console.error": true + }, + "packages": { + "@metamask/browser-passworder": true, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": true, + "@metamask/keyring-controller>@metamask/utils": true, + "@metamask/obs-store": true, + "browserify>events": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": { + "packages": { + "@ethereumjs/tx>@ethereumjs/util": true, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true, + "bn.js": true, + "browserify>buffer": true, + "eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-sig-util>tweetnacl": true, + "eth-sig-util>tweetnacl-util": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/keyring-controller>@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/keyring-controller>ethereumjs-wallet": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true, + "@truffle/codec>utf8": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>ethereum-cryptography>scrypt-js": true, + "ethereumjs-wallet>aes-js": true, + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "uuid": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { + "packages": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": true, + "browserify>assert": true, + "browserify>buffer": true, + "browserify>insert-module-globals>is-buffer": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-util>rlp": true + } + }, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>bn.js": { + "globals": { + "Buffer": true + }, + "packages": { + "browserify>browser-resolve": true + } + }, "@metamask/logo": { "globals": { "addEventListener": true, @@ -1781,7 +1866,7 @@ "@metamask/message-manager>@metamask/eth-sig-util": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true, "bn.js": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, @@ -1789,6 +1874,21 @@ "eth-sig-util>tweetnacl-util": true } }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@metamask/message-manager>jsonschema": { "packages": { "browserify>url": true @@ -3524,27 +3624,11 @@ "@ethersproject/providers": true, "browserify>buffer": true, "browserify>insert-module-globals>is-buffer": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": true, + "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true } }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz": { - "packages": { - "browserify": true, - "browserify>buffer": true, - "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true - } - }, - "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": { - "globals": { - "WeakRef": true - }, - "packages": { - "browserify": true - } - }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/common>crc-32": true, @@ -3752,20 +3836,11 @@ "browserify>assert": true, "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } }, - "ethereumjs-abi>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-util": { "packages": { "browserify>assert": true, @@ -3836,10 +3911,15 @@ }, "ethereumjs-util>ethereum-cryptography": { "packages": { + "browserify>assert": true, "browserify>buffer": true, + "browserify>crypto-browserify>create-hmac": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>keccak": true, "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "ethereumjs-wallet>safe-buffer": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { @@ -3959,7 +4039,6 @@ "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>rlp": true, - "ethereumjs-wallet>ethereum-cryptography": true, "ganache>secp256k1>elliptic": true } }, @@ -4904,4 +4983,4 @@ } } } -} \ No newline at end of file +} diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index c06248a42fb5..9718b09b14ae 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -984,6 +984,7 @@ "packages": { "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>are-we-there-yet": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge": true, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>console-control-strings": true, "@storybook/react>@storybook/node-logger>npmlog>console-control-strings": true, "nyc>yargs>set-blocking": true } @@ -1012,6 +1013,9 @@ "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>aproba": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>string-width": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>strip-ansi": true, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>console-control-strings": true, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>has-unicode": true, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>wide-align": true, "@storybook/react>@storybook/node-logger>npmlog>console-control-strings": true, "@storybook/react>@storybook/node-logger>npmlog>gauge>has-unicode": true, "@storybook/react>@storybook/node-logger>npmlog>gauge>wide-align": true, @@ -1134,6 +1138,21 @@ "string.prototype.matchall>side-channel": true } }, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>has-unicode": { + "builtin": { + "os.type": true + }, + "globals": { + "process.env.LANG": true, + "process.env.LC_ALL": true, + "process.env.LC_CTYPE": true + } + }, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>wide-align": { + "packages": { + "yargs>string-width": true + } + }, "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": { "builtin": { "os.homedir": true @@ -4875,9 +4894,20 @@ }, "packages": { "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true } }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": { + "builtin": { + "os.homedir": true + }, + "globals": { + "process.env": true, + "process.getuid": true, + "process.platform": true + } + }, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": { "globals": { "process.env.SystemRoot": true, @@ -4899,9 +4929,34 @@ "setTimeout": true }, "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": true, "nyc>glob": true } }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": { + "builtin": { + "assert": true, + "events.EventEmitter": true, + "fs": true, + "path.join": true, + "path.resolve": true, + "util": true + }, + "globals": { + "console.error": true, + "process.cwd": true, + "process.nextTick": true, + "process.platform": true + }, + "packages": { + "eslint>minimatch": true, + "gulp-watch>path-is-absolute": true, + "nyc>glob>fs.realpath": true, + "nyc>glob>inflight": true, + "pump>once": true, + "pumpify>inherits": true + } + }, "gulp-watch>chokidar>fsevents>node-pre-gyp>semver": { "globals": { "console": true, diff --git a/package.json b/package.json index a64e31a1581b..df0f17b4792d 100644 --- a/package.json +++ b/package.json @@ -198,6 +198,7 @@ "request@^2.88.2": "patch:request@npm%3A2.88.2#./.yarn/patches/request-npm-2.88.2-f4a57c72c4.patch", "request@^2.85.0": "patch:request@npm%3A2.88.2#./.yarn/patches/request-npm-2.88.2-f4a57c72c4.patch", "lavamoat-core@^14.2.0": "patch:lavamoat-core@npm%3A14.2.0#./.yarn/patches/lavamoat-core-npm-14.2.0-c453f4f755.patch", + "@metamask/keyring-controller@^7.0.0": "patch:@metamask/keyring-controller@npm%3A7.0.0#./.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch", "@metamask/signature-controller@^5.3.0": "patch:@metamask/signature-controller@npm%3A5.3.0#./.yarn/patches/@metamask-signature-controller-npm-5.3.0-225628460b.patch" }, "dependencies": { @@ -245,6 +246,7 @@ "@metamask/gas-fee-controller": "^6.0.1", "@metamask/jazzicon": "^2.0.0", "@metamask/key-tree": "^9.0.0", + "@metamask/keyring-controller": "^7.0.0", "@metamask/logo": "^3.1.1", "@metamask/message-manager": "^7.0.2", "@metamask/metamask-eth-abis": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 2e9667dd37ec..811ca0ca6c0b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1633,13 +1633,6 @@ __metadata: languageName: node linkType: hard -"@chainsafe/as-sha256@npm:^0.4.1": - version: 0.4.1 - resolution: "@chainsafe/as-sha256@npm:0.4.1" - checksum: 6d86975e648ecdafd366802278ac15b392b252e967f3681412ec48b5a3518b936cc5e977517499882b084991446d25787d98f8f585891943688cc81549a44e9a - languageName: node - linkType: hard - "@chainsafe/persistent-merkle-tree@npm:^0.4.2": version: 0.4.2 resolution: "@chainsafe/persistent-merkle-tree@npm:0.4.2" @@ -1649,16 +1642,6 @@ __metadata: languageName: node linkType: hard -"@chainsafe/persistent-merkle-tree@npm:^0.6.1": - version: 0.6.1 - resolution: "@chainsafe/persistent-merkle-tree@npm:0.6.1" - dependencies: - "@chainsafe/as-sha256": ^0.4.1 - "@noble/hashes": ^1.3.0 - checksum: 74614b8d40970dc930d5bf741619498b0bbbde5ff24ce45fce6ad122143aa77bf57249a28175b1b972cf56bff57d529a4258b7222ab4e60c1261119b5986c51b - languageName: node - linkType: hard - "@chainsafe/ssz@npm:0.9.4": version: 0.9.4 resolution: "@chainsafe/ssz@npm:0.9.4" @@ -1670,16 +1653,6 @@ __metadata: languageName: node linkType: hard -"@chainsafe/ssz@npm:^0.11.1": - version: 0.11.1 - resolution: "@chainsafe/ssz@npm:0.11.1" - dependencies: - "@chainsafe/as-sha256": ^0.4.1 - "@chainsafe/persistent-merkle-tree": ^0.6.1 - checksum: e3c2928f9ab4a0544e645f0302b9535046d1e6e1d4b3bd1c3dd6bc8e6302fddad6036d65e7900d1446f285f496051da05fa14c1bde590b511d03033907175c8f - languageName: node - linkType: hard - "@choojs/findup@npm:^0.2.1": version: 0.2.1 resolution: "@choojs/findup@npm:0.2.1" @@ -2188,13 +2161,13 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:^3.1.1, @ethereumjs/common@npm:^3.1.2": - version: 3.1.2 - resolution: "@ethereumjs/common@npm:3.1.2" +"@ethereumjs/common@npm:^3.1.1, @ethereumjs/common@npm:^3.2.0": + version: 3.2.0 + resolution: "@ethereumjs/common@npm:3.2.0" dependencies: - "@ethereumjs/util": ^8.0.6 + "@ethereumjs/util": ^8.1.0 crc-32: ^1.2.0 - checksum: e80a8bc86476f1ce878bacb1915d91681671bb5303291cdcece26e456ac13a6158f0f59625cb02a1cfbdd7c9a7dc8b175f8d8f0fee596b3eb9dfb965465ad43d + checksum: cb9cc11f5c868cb577ba611cebf55046e509218bbb89b47ccce010776dafe8256d70f8f43fab238aec74cf71f62601cd5842bc03a83261200802de365732a14b languageName: node linkType: hard @@ -2226,33 +2199,26 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^4.0.0, @ethereumjs/tx@npm:^4.0.2, @ethereumjs/tx@npm:^4.1.1, @ethereumjs/tx@npm:^4.1.2": - version: 4.1.2 - resolution: "@ethereumjs/tx@npm:4.1.2" +"@ethereumjs/tx@npm:^4.0.0, @ethereumjs/tx@npm:^4.0.2, @ethereumjs/tx@npm:^4.1.1, @ethereumjs/tx@npm:^4.1.2, @ethereumjs/tx@npm:^4.2.0": + version: 4.2.0 + resolution: "@ethereumjs/tx@npm:4.2.0" dependencies: - "@chainsafe/ssz": ^0.11.1 - "@ethereumjs/common": ^3.1.2 + "@ethereumjs/common": ^3.2.0 "@ethereumjs/rlp": ^4.0.1 - "@ethereumjs/util": ^8.0.6 + "@ethereumjs/util": ^8.1.0 ethereum-cryptography: ^2.0.0 - peerDependencies: - c-kzg: ^1.0.8 - peerDependenciesMeta: - c-kzg: - optional: true - checksum: ad2fb692c3746cd5935b01c98b6b54046ae2a1fccff57ad2209e10446f3b279a204d7477accf05b27078445b14379314077769662142ac07117c45a5a1ea427f + checksum: 87a3f5f2452cfbf6712f8847525a80c213210ed453c211c793c5df801fe35ecef28bae17fadd222fcbdd94277478a47e52d2b916a90a6b30cda21f1e0cdaee42 languageName: node linkType: hard -"@ethereumjs/util@npm:^8.0.0, @ethereumjs/util@npm:^8.0.2, @ethereumjs/util@npm:^8.0.5, @ethereumjs/util@npm:^8.0.6": - version: 8.0.6 - resolution: "@ethereumjs/util@npm:8.0.6" +"@ethereumjs/util@npm:^8.0.0, @ethereumjs/util@npm:^8.0.2, @ethereumjs/util@npm:^8.0.5, @ethereumjs/util@npm:^8.0.6, @ethereumjs/util@npm:^8.1.0": + version: 8.1.0 + resolution: "@ethereumjs/util@npm:8.1.0" dependencies: - "@chainsafe/ssz": ^0.11.1 "@ethereumjs/rlp": ^4.0.1 ethereum-cryptography: ^2.0.0 micro-ftch: ^0.3.1 - checksum: 034e06cddec27417318434a1a7cd7a9dc0f0b447c1f54423c515d8809c9697386eee6429d0a1c13517a85c696e6fdba570b243d882e65764c274859606027015 + checksum: 9ae5dee8f12b0faf81cd83f06a41560e79b0ba96a48262771d897a510ecae605eb6d84f687da001ab8ccffd50f612ae50f988ef76e6312c752897f462f3ac08d languageName: node linkType: hard @@ -4135,6 +4101,21 @@ __metadata: languageName: node linkType: hard +"@metamask/eth-keyring-controller@npm:^13.0.0": + version: 13.0.0 + resolution: "@metamask/eth-keyring-controller@npm:13.0.0" + dependencies: + "@ethereumjs/tx": ^4.2.0 + "@metamask/browser-passworder": ^4.1.0 + "@metamask/eth-hd-keyring": ^6.0.0 + "@metamask/eth-sig-util": ^6.0.0 + "@metamask/eth-simple-keyring": ^5.0.0 + "@metamask/obs-store": ^8.1.0 + "@metamask/utils": ^6.2.0 + checksum: 28ee9e844698d6fc9718eb9f434bb3472ed3e4a3875099df3daddb649618d9d0618b9bbf3cae07e54481378b7935242cf452b2d366982456956b5140a2aa3da3 + languageName: node + linkType: hard + "@metamask/eth-ledger-bridge-keyring@npm:^0.15.0": version: 0.15.0 resolution: "@metamask/eth-ledger-bridge-keyring@npm:0.15.0" @@ -4334,6 +4315,46 @@ __metadata: languageName: node linkType: hard +"@metamask/keyring-controller@npm:7.0.0": + version: 7.0.0 + resolution: "@metamask/keyring-controller@npm:7.0.0" + dependencies: + "@keystonehq/metamask-airgapped-keyring": ^0.13.1 + "@metamask/base-controller": ^3.2.0 + "@metamask/eth-keyring-controller": ^13.0.0 + "@metamask/message-manager": ^7.2.0 + "@metamask/preferences-controller": ^4.2.0 + "@metamask/utils": ^6.2.0 + async-mutex: ^0.2.6 + ethereumjs-util: ^7.0.10 + ethereumjs-wallet: ^1.0.1 + immer: ^9.0.6 + peerDependencies: + "@metamask/preferences-controller": ^4.2.0 + checksum: c5e0433cd5b253292cefbd2e168931d87bd91d3ee34378480fef630e3e183d9f003298638bfc516530615ad339e18a51df2802264849298e6ef0e71f4c375c65 + languageName: node + linkType: hard + +"@metamask/keyring-controller@patch:@metamask/keyring-controller@npm%3A7.0.0#./.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch::locator=metamask-crx%40workspace%3A.": + version: 7.0.0 + resolution: "@metamask/keyring-controller@patch:@metamask/keyring-controller@npm%3A7.0.0#./.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch::version=7.0.0&hash=21d613&locator=metamask-crx%40workspace%3A." + dependencies: + "@keystonehq/metamask-airgapped-keyring": ^0.13.1 + "@metamask/base-controller": ^3.2.0 + "@metamask/eth-keyring-controller": ^13.0.0 + "@metamask/message-manager": ^7.2.0 + "@metamask/preferences-controller": ^4.2.0 + "@metamask/utils": ^6.2.0 + async-mutex: ^0.2.6 + ethereumjs-util: ^7.0.10 + ethereumjs-wallet: ^1.0.1 + immer: ^9.0.6 + peerDependencies: + "@metamask/preferences-controller": ^4.2.0 + checksum: 67935ed387d26f4da102e4ab68c18aaf9df86a6ab089299a36e7086654f86ed690e719ddfb81b68a6c574590597bf848bf8b96904bb259b87aab80fe773e1a0a + languageName: node + linkType: hard + "@metamask/logo@npm:^3.1.1": version: 3.1.1 resolution: "@metamask/logo@npm:3.1.1" @@ -4536,13 +4557,13 @@ __metadata: languageName: node linkType: hard -"@metamask/preferences-controller@npm:^4.1.0": - version: 4.1.0 - resolution: "@metamask/preferences-controller@npm:4.1.0" +"@metamask/preferences-controller@npm:^4.1.0, @metamask/preferences-controller@npm:^4.2.0": + version: 4.2.0 + resolution: "@metamask/preferences-controller@npm:4.2.0" dependencies: "@metamask/base-controller": ^3.0.0 - "@metamask/controller-utils": ^4.0.0 - checksum: 7a121d959082787767786639f5558496c3782bf119f317c24ccae7dc038e8c1a52676d4b5b1c6d94b6563c94d01f24cd3793167322ad5f28dce803223d774fcd + "@metamask/controller-utils": ^4.1.0 + checksum: 492ee83c5d0259c77e8dd58076d06c09456192fe06777d5800b4e6673b6752fc7c00f7a4eb866cf3730a925946e79fd7bcdb31d3963ef44751f3307b5403d12d languageName: node linkType: hard @@ -5172,7 +5193,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.1.3, @noble/hashes@npm:^1.3.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:~1.3.0": +"@noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.1.3, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:~1.3.0": version: 1.3.1 resolution: "@noble/hashes@npm:1.3.1" checksum: 7fdefc0f7a0c1ec27acc6ff88841793e3f93ec4ce6b8a6a12bfc0dd70ae6b7c4c82fe305fdfeda1735d5ad4a9eebe761e6693b3d355689c559e91242f4bc95b1 @@ -9352,7 +9373,7 @@ __metadata: languageName: node linkType: hard -"aes-js@npm:^3.1.1": +"aes-js@npm:^3.1.1, aes-js@npm:^3.1.2": version: 3.1.2 resolution: "aes-js@npm:3.1.2" checksum: 062154d50b1e433cc8c3b8ca7879f3a6375d5e79c2a507b2b6c4ec920b4cd851bf2afa7f65c98761a9da89c0ab618cbe6529e8e9a1c71f93290b53128fb8f712 @@ -16142,7 +16163,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:7.1.5": +"ethereumjs-util@npm:7.1.5, ethereumjs-util@npm:^7.1.2": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -16215,6 +16236,22 @@ __metadata: languageName: node linkType: hard +"ethereumjs-wallet@npm:^1.0.1": + version: 1.0.2 + resolution: "ethereumjs-wallet@npm:1.0.2" + dependencies: + aes-js: ^3.1.2 + bs58check: ^2.1.2 + ethereum-cryptography: ^0.1.3 + ethereumjs-util: ^7.1.2 + randombytes: ^2.1.0 + scrypt-js: ^3.0.1 + utf8: ^3.0.0 + uuid: ^8.3.2 + checksum: 555effe571c633ca9189e08639928e7bfcb601474f5a37653a3d028b06a10fb8577408c32d425ccecb3ac25d7165322cb9786239fa09ce276532d262206feb8c + languageName: node + linkType: hard + "ethers@npm:^5.0.13": version: 5.7.2 resolution: "ethers@npm:5.7.2" @@ -24241,6 +24278,7 @@ __metadata: "@metamask/gas-fee-controller": ^6.0.1 "@metamask/jazzicon": ^2.0.0 "@metamask/key-tree": ^9.0.0 + "@metamask/keyring-controller": ^7.0.0 "@metamask/logo": ^3.1.1 "@metamask/message-manager": ^7.0.2 "@metamask/metamask-eth-abis": ^3.0.0 @@ -30716,7 +30754,7 @@ __metadata: languageName: node linkType: hard -"scrypt-js@npm:3.0.1, scrypt-js@npm:^3.0.0": +"scrypt-js@npm:3.0.1, scrypt-js@npm:^3.0.0, scrypt-js@npm:^3.0.1": version: 3.0.1 resolution: "scrypt-js@npm:3.0.1" checksum: b7c7d1a68d6ca946f2fbb0778e0c4ec63c65501b54023b2af7d7e9f48fdb6c6580d6f7675cd53bda5944c5ebc057560d5a6365079752546865defb3b79dea454 From 346348ef65916f6325f8be73883d35ec472d020a Mon Sep 17 00:00:00 2001 From: Michele Esposito Date: Wed, 19 Jul 2023 00:00:12 +0200 Subject: [PATCH 2/6] refactor: run prettier --- app/scripts/metamask-controller.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 76226b479eb9..27902408024c 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -6,9 +6,7 @@ import { JsonRpcEngine } from 'json-rpc-engine'; import { createEngineStream } from 'json-rpc-middleware-stream'; import { providerAsMiddleware } from '@metamask/eth-json-rpc-middleware'; import { debounce } from 'lodash'; -import { - keyringBuilderFactory, -} from '@metamask/eth-keyring-controller'; +import { keyringBuilderFactory } from '@metamask/eth-keyring-controller'; import { KeyringController } from '@metamask/keyring-controller'; import createFilterMiddleware from 'eth-json-rpc-filters'; import createSubscriptionManager from 'eth-json-rpc-filters/subscriptionManager'; From a5a90e110aad8560f559e13c4d1afe260d62da08 Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Tue, 18 Jul 2023 22:10:45 +0000 Subject: [PATCH 3/6] Update LavaMoat policies --- lavamoat/build-system/policy.json | 55 ------------------------------- 1 file changed, 55 deletions(-) diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 9718b09b14ae..c06248a42fb5 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -984,7 +984,6 @@ "packages": { "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>are-we-there-yet": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge": true, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>console-control-strings": true, "@storybook/react>@storybook/node-logger>npmlog>console-control-strings": true, "nyc>yargs>set-blocking": true } @@ -1013,9 +1012,6 @@ "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>aproba": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>string-width": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>strip-ansi": true, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>console-control-strings": true, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>has-unicode": true, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>wide-align": true, "@storybook/react>@storybook/node-logger>npmlog>console-control-strings": true, "@storybook/react>@storybook/node-logger>npmlog>gauge>has-unicode": true, "@storybook/react>@storybook/node-logger>npmlog>gauge>wide-align": true, @@ -1138,21 +1134,6 @@ "string.prototype.matchall>side-channel": true } }, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>has-unicode": { - "builtin": { - "os.type": true - }, - "globals": { - "process.env.LANG": true, - "process.env.LC_ALL": true, - "process.env.LC_CTYPE": true - } - }, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>wide-align": { - "packages": { - "yargs>string-width": true - } - }, "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": { "builtin": { "os.homedir": true @@ -4894,20 +4875,9 @@ }, "packages": { "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": { - "builtin": { - "os.homedir": true - }, - "globals": { - "process.env": true, - "process.getuid": true, - "process.platform": true - } - }, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": { "globals": { "process.env.SystemRoot": true, @@ -4929,34 +4899,9 @@ "setTimeout": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": true, "nyc>glob": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": { - "builtin": { - "assert": true, - "events.EventEmitter": true, - "fs": true, - "path.join": true, - "path.resolve": true, - "util": true - }, - "globals": { - "console.error": true, - "process.cwd": true, - "process.nextTick": true, - "process.platform": true - }, - "packages": { - "eslint>minimatch": true, - "gulp-watch>path-is-absolute": true, - "nyc>glob>fs.realpath": true, - "nyc>glob>inflight": true, - "pump>once": true, - "pumpify>inherits": true - } - }, "gulp-watch>chokidar>fsevents>node-pre-gyp>semver": { "globals": { "console": true, From 251e7d5d9648005de5d47709d0cc8cf420a05f17 Mon Sep 17 00:00:00 2001 From: Michele Esposito Date: Wed, 19 Jul 2023 13:46:10 +0200 Subject: [PATCH 4/6] refactor: change patch to use EthKeyringController type --- ...etamask-keyring-controller-npm-7.0.0-962008b200.patch | 9 +++++---- yarn.lock | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch b/.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch index be356a5ff430..15d28303ce1d 100644 --- a/.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch +++ b/.yarn/patches/@metamask-keyring-controller-npm-7.0.0-962008b200.patch @@ -1,8 +1,8 @@ diff --git a/dist/KeyringController.d.ts b/dist/KeyringController.d.ts -index 82de83a7bb1ad14bb23f3b6274e0c4d5bb773382..35ec924d1530eb944c77c9605a1fb1dda58ebcaf 100644 +index 82de83a7bb1ad14bb23f3b6274e0c4d5bb773382..86a09b3f604f6feb26e2c7edbdcb0abebd4bae20 100644 --- a/dist/KeyringController.d.ts +++ b/dist/KeyringController.d.ts -@@ -1,10 +1,10 @@ +@@ -1,10 +1,11 @@ import type { TxData, TypedTransaction } from '@ethereumjs/tx'; -import { type MetaMaskKeyring as QRKeyring, type IKeyringState as IQRKeyringState } from '@keystonehq/metamask-airgapped-keyring'; +import type { MetaMaskKeyring as QRKeyring, IKeyringState as IQRKeyringState } from '@keystonehq/metamask-airgapped-keyring'; @@ -12,17 +12,18 @@ index 82de83a7bb1ad14bb23f3b6274e0c4d5bb773382..35ec924d1530eb944c77c9605a1fb1dd import type { PreferencesController } from '@metamask/preferences-controller'; -import { type Hex, type Keyring, type Json } from '@metamask/utils'; +import type { Hex, Keyring, Json } from '@metamask/utils'; ++import type { KeyringController as EthKeyringController } from '@metamask/eth-keyring-controller'; import type { Patch } from 'immer'; declare const name = "KeyringController"; /** -@@ -135,6 +135,10 @@ export declare class KeyringController extends BaseControllerV2 Date: Mon, 24 Jul 2023 12:31:58 +0200 Subject: [PATCH 5/6] chore: change policies --- lavamoat/browserify/beta/policy.json | 42 ++++++++------- lavamoat/browserify/desktop/policy.json | 42 ++++++++------- lavamoat/browserify/flask/policy.json | 42 ++++++++------- lavamoat/browserify/main/policy.json | 42 ++++++++------- lavamoat/browserify/mmi/policy.json | 42 ++++++++------- lavamoat/build-system/policy.json | 71 ++++++++++++++++++++++--- 6 files changed, 173 insertions(+), 108 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 6bc976794117..85d4a5bf485a 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -156,13 +156,29 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, - "@ethereumjs/tx>ethereum-cryptography": true, "browserify>buffer": true, "browserify>events": true, "browserify>insert-module-globals>is-buffer": true } }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true + } + }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, @@ -187,7 +203,6 @@ "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, @@ -1093,6 +1108,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true @@ -3553,22 +3569,14 @@ "bn.js": true, "browserify>assert": true, "browserify>buffer": true, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true } }, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "eth-sig-util>ethereumjs-util>ethjs-util": { "packages": { "browserify>buffer": true, @@ -3609,6 +3617,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -3795,14 +3804,6 @@ "ethereumjs-wallet>safe-buffer": true } }, - "ethereumjs-wallet>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-wallet>ethereumjs-util": { "packages": { "bn.js": true, @@ -3810,6 +3811,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -4755,4 +4757,4 @@ } } } -} +} \ No newline at end of file diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json index 5c672c5c2362..0de5f49f481a 100644 --- a/lavamoat/browserify/desktop/policy.json +++ b/lavamoat/browserify/desktop/policy.json @@ -156,13 +156,29 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, - "@ethereumjs/tx>ethereum-cryptography": true, "browserify>buffer": true, "browserify>events": true, "browserify>insert-module-globals>is-buffer": true } }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true + } + }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, @@ -187,7 +203,6 @@ "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, @@ -1164,6 +1179,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true @@ -4049,22 +4065,14 @@ "bn.js": true, "browserify>assert": true, "browserify>buffer": true, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true } }, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "eth-sig-util>ethereumjs-util>ethjs-util": { "packages": { "browserify>buffer": true, @@ -4105,6 +4113,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -4291,14 +4300,6 @@ "ethereumjs-wallet>safe-buffer": true } }, - "ethereumjs-wallet>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-wallet>ethereumjs-util": { "packages": { "bn.js": true, @@ -4306,6 +4307,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -5393,4 +5395,4 @@ } } } -} +} \ No newline at end of file diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 5c672c5c2362..0de5f49f481a 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -156,13 +156,29 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, - "@ethereumjs/tx>ethereum-cryptography": true, "browserify>buffer": true, "browserify>events": true, "browserify>insert-module-globals>is-buffer": true } }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true + } + }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, @@ -187,7 +203,6 @@ "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, @@ -1164,6 +1179,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true @@ -4049,22 +4065,14 @@ "bn.js": true, "browserify>assert": true, "browserify>buffer": true, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true } }, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "eth-sig-util>ethereumjs-util>ethjs-util": { "packages": { "browserify>buffer": true, @@ -4105,6 +4113,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -4291,14 +4300,6 @@ "ethereumjs-wallet>safe-buffer": true } }, - "ethereumjs-wallet>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-wallet>ethereumjs-util": { "packages": { "bn.js": true, @@ -4306,6 +4307,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -5393,4 +5395,4 @@ } } } -} +} \ No newline at end of file diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 6bc976794117..85d4a5bf485a 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -156,13 +156,29 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, - "@ethereumjs/tx>ethereum-cryptography": true, "browserify>buffer": true, "browserify>events": true, "browserify>insert-module-globals>is-buffer": true } }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true + } + }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, @@ -187,7 +203,6 @@ "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, @@ -1093,6 +1108,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true @@ -3553,22 +3569,14 @@ "bn.js": true, "browserify>assert": true, "browserify>buffer": true, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true } }, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "eth-sig-util>ethereumjs-util>ethjs-util": { "packages": { "browserify>buffer": true, @@ -3609,6 +3617,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -3795,14 +3804,6 @@ "ethereumjs-wallet>safe-buffer": true } }, - "ethereumjs-wallet>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-wallet>ethereumjs-util": { "packages": { "bn.js": true, @@ -3810,6 +3811,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -4755,4 +4757,4 @@ } } } -} +} \ No newline at end of file diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 68313535017b..1694959e50f7 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -156,13 +156,29 @@ }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true, - "@ethereumjs/tx>ethereum-cryptography": true, "browserify>buffer": true, "browserify>events": true, "browserify>insert-module-globals>is-buffer": true } }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true, + "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true + } + }, + "@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, @@ -187,7 +203,6 @@ "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, @@ -1321,6 +1336,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true @@ -3781,22 +3797,14 @@ "bn.js": true, "browserify>assert": true, "browserify>buffer": true, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, "ganache>secp256k1>elliptic": true } }, - "eth-sig-util>ethereumjs-util>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "eth-sig-util>ethereumjs-util>ethjs-util": { "packages": { "browserify>buffer": true, @@ -3837,6 +3845,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -4023,14 +4032,6 @@ "ethereumjs-wallet>safe-buffer": true } }, - "ethereumjs-wallet>ethereum-cryptography": { - "packages": { - "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>randombytes": true - } - }, "ethereumjs-wallet>ethereumjs-util": { "packages": { "bn.js": true, @@ -4038,6 +4039,7 @@ "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, "ethereumjs-util>create-hash": true, + "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ganache>secp256k1>elliptic": true } @@ -4983,4 +4985,4 @@ } } } -} +} \ No newline at end of file diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index c06248a42fb5..693f021d42c4 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -984,6 +984,7 @@ "packages": { "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>are-we-there-yet": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge": true, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>console-control-strings": true, "@storybook/react>@storybook/node-logger>npmlog>console-control-strings": true, "nyc>yargs>set-blocking": true } @@ -1012,6 +1013,9 @@ "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>aproba": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>string-width": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>strip-ansi": true, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>console-control-strings": true, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>has-unicode": true, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>wide-align": true, "@storybook/react>@storybook/node-logger>npmlog>console-control-strings": true, "@storybook/react>@storybook/node-logger>npmlog>gauge>has-unicode": true, "@storybook/react>@storybook/node-logger>npmlog>gauge>wide-align": true, @@ -1134,6 +1138,21 @@ "string.prototype.matchall>side-channel": true } }, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>has-unicode": { + "builtin": { + "os.type": true + }, + "globals": { + "process.env.LANG": true, + "process.env.LC_ALL": true, + "process.env.LC_CTYPE": true + } + }, + "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>wide-align": { + "packages": { + "yargs>string-width": true + } + }, "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": { "builtin": { "os.homedir": true @@ -4875,9 +4894,20 @@ }, "packages": { "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true } }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": { + "builtin": { + "os.homedir": true + }, + "globals": { + "process.env": true, + "process.getuid": true, + "process.platform": true + } + }, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": { "globals": { "process.env.SystemRoot": true, @@ -4899,9 +4929,34 @@ "setTimeout": true }, "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": true, "nyc>glob": true } }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": { + "builtin": { + "assert": true, + "events.EventEmitter": true, + "fs": true, + "path.join": true, + "path.resolve": true, + "util": true + }, + "globals": { + "console.error": true, + "process.cwd": true, + "process.nextTick": true, + "process.platform": true + }, + "packages": { + "eslint>minimatch": true, + "gulp-watch>path-is-absolute": true, + "nyc>glob>fs.realpath": true, + "nyc>glob>inflight": true, + "pump>once": true, + "pumpify>inherits": true + } + }, "gulp-watch>chokidar>fsevents>node-pre-gyp>semver": { "globals": { "console": true, @@ -6487,6 +6542,13 @@ "process.platform": true } }, + "mockttp>portfinder>mkdirp": { + "builtin": { + "fs": true, + "path.dirname": true, + "path.resolve": true + } + }, "nock>debug": { "builtin": { "tty.isatty": true, @@ -8151,14 +8213,7 @@ "path.dirname": true }, "packages": { - "stylelint>file-entry-cache>flat-cache>write>mkdirp": true - } - }, - "stylelint>file-entry-cache>flat-cache>write>mkdirp": { - "builtin": { - "fs": true, - "path.dirname": true, - "path.resolve": true + "mockttp>portfinder>mkdirp": true } }, "stylelint>global-modules": { From 608b9114aa51a4561e8a1904caf50793c020bb73 Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Mon, 24 Jul 2023 11:04:48 +0000 Subject: [PATCH 6/6] Update LavaMoat policies --- lavamoat/build-system/policy.json | 71 ++++--------------------------- 1 file changed, 8 insertions(+), 63 deletions(-) diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 693f021d42c4..c06248a42fb5 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -984,7 +984,6 @@ "packages": { "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>are-we-there-yet": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge": true, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>console-control-strings": true, "@storybook/react>@storybook/node-logger>npmlog>console-control-strings": true, "nyc>yargs>set-blocking": true } @@ -1013,9 +1012,6 @@ "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>aproba": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>string-width": true, "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog>gauge>strip-ansi": true, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>console-control-strings": true, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>has-unicode": true, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>wide-align": true, "@storybook/react>@storybook/node-logger>npmlog>console-control-strings": true, "@storybook/react>@storybook/node-logger>npmlog>gauge>has-unicode": true, "@storybook/react>@storybook/node-logger>npmlog>gauge>wide-align": true, @@ -1138,21 +1134,6 @@ "string.prototype.matchall>side-channel": true } }, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>has-unicode": { - "builtin": { - "os.type": true - }, - "globals": { - "process.env.LANG": true, - "process.env.LC_ALL": true, - "process.env.LC_CTYPE": true - } - }, - "@storybook/addon-mdx-gfm>@storybook/node-logger>npmlog>gauge>wide-align": { - "packages": { - "yargs>string-width": true - } - }, "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": { "builtin": { "os.homedir": true @@ -4894,20 +4875,9 @@ }, "packages": { "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": { - "builtin": { - "os.homedir": true - }, - "globals": { - "process.env": true, - "process.getuid": true, - "process.platform": true - } - }, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": { "globals": { "process.env.SystemRoot": true, @@ -4929,34 +4899,9 @@ "setTimeout": true }, "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": true, "nyc>glob": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf>glob": { - "builtin": { - "assert": true, - "events.EventEmitter": true, - "fs": true, - "path.join": true, - "path.resolve": true, - "util": true - }, - "globals": { - "console.error": true, - "process.cwd": true, - "process.nextTick": true, - "process.platform": true - }, - "packages": { - "eslint>minimatch": true, - "gulp-watch>path-is-absolute": true, - "nyc>glob>fs.realpath": true, - "nyc>glob>inflight": true, - "pump>once": true, - "pumpify>inherits": true - } - }, "gulp-watch>chokidar>fsevents>node-pre-gyp>semver": { "globals": { "console": true, @@ -6542,13 +6487,6 @@ "process.platform": true } }, - "mockttp>portfinder>mkdirp": { - "builtin": { - "fs": true, - "path.dirname": true, - "path.resolve": true - } - }, "nock>debug": { "builtin": { "tty.isatty": true, @@ -8213,7 +8151,14 @@ "path.dirname": true }, "packages": { - "mockttp>portfinder>mkdirp": true + "stylelint>file-entry-cache>flat-cache>write>mkdirp": true + } + }, + "stylelint>file-entry-cache>flat-cache>write>mkdirp": { + "builtin": { + "fs": true, + "path.dirname": true, + "path.resolve": true } }, "stylelint>global-modules": {