diff --git a/app/scripts/lib/seed-phrase-verifier.js b/app/scripts/lib/seed-phrase-verifier.js index f273084ef..5fcaf4481 100644 --- a/app/scripts/lib/seed-phrase-verifier.js +++ b/app/scripts/lib/seed-phrase-verifier.js @@ -1,4 +1,4 @@ -import KeyringController from 'eth-keyring-controller'; +import { KeyringController } from '@metamask/eth-keyring-controller'; import log from 'loglevel'; import { HardwareKeyringTypes } from '../../../shared/constants/hardware-wallets'; @@ -22,15 +22,16 @@ const seedPhraseVerifier = { } const keyringController = new KeyringController({}); - const Keyring = keyringController.getKeyringClassForType( + const keyringBuilder = keyringController.getKeyringBuilderForType( HardwareKeyringTypes.hdKeyTree, ); + const keyring = keyringBuilder(); const opts = { mnemonic: seedPhrase, numberOfAccounts: createdAccounts.length, }; - const keyring = new Keyring(opts); + await keyring.deserialize(opts); const restoredAccounts = await keyring.getAccounts(); log.debug(`Created accounts: ${JSON.stringify(createdAccounts)}`); log.debug(`Restored accounts: ${JSON.stringify(restoredAccounts)}`); diff --git a/app/scripts/lib/seed-phrase-verifier.test.js b/app/scripts/lib/seed-phrase-verifier.test.js index 02ad1c9cc..bf888f79b 100644 --- a/app/scripts/lib/seed-phrase-verifier.test.js +++ b/app/scripts/lib/seed-phrase-verifier.test.js @@ -3,7 +3,7 @@ * https://github.com/facebook/jest/issues/7780 */ import { cloneDeep } from 'lodash'; -import KeyringController from 'eth-keyring-controller'; +import { KeyringController } from '@metamask/eth-keyring-controller'; import firstTimeState from '../first-time-state'; import mockEncryptor from '../../../test/lib/mock-encryptor'; import { HardwareKeyringTypes } from '../../../shared/constants/hardware-wallets'; diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 2ac906f43..6f0b03c92 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -6,7 +6,10 @@ import { JsonRpcEngine } from 'json-rpc-engine'; import { debounce } from 'lodash'; import createEngineStream from 'json-rpc-middleware-stream/engineStream'; import { providerAsMiddleware } from 'eth-json-rpc-middleware'; -import KeyringController from 'eth-keyring-controller'; +import { + KeyringController, + keyringBuilderFactory, +} from '@metamask/eth-keyring-controller'; import { errorCodes as rpcErrorCodes, EthereumRpcError, @@ -57,6 +60,8 @@ import { } from '@metamask/snaps-controllers'; ///: END:ONLY_INCLUDE_IN +import { wordlist as englishWordlist } from '@metamask/scure-bip39/dist/wordlists/english'; + import browser from 'webextension-polyfill'; import { AssetType, @@ -641,15 +646,19 @@ export default class MetamaskController extends EventEmitter { let additionalKeyrings = []; if (!isManifestV3) { - additionalKeyrings = [ + const additionalKeyringTypes = [ TrezorKeyring, LedgerBridgeKeyring, LatticeKeyring, QRHardwareKeyring, ]; + additionalKeyrings = additionalKeyringTypes.map((keyringType) => + keyringBuilderFactory(keyringType), + ); } + this.keyringController = new KeyringController({ - keyringTypes: additionalKeyrings, + keyringBuilders: additionalKeyrings, initState: initState.KeyringController, encryptor: opts.encryptor || undefined, cacheEncryptionKey: isManifestV3, @@ -2568,7 +2577,11 @@ export default class MetamaskController extends EventEmitter { if (!keyring.mnemonic) { throw new Error('Primary keyring mnemonic unavailable.'); } - return keyring.mnemonic; + + const recoveredIndices = Array.from( + new Uint16Array(new Uint8Array(keyring.mnemonic).buffer), + ); + return recoveredIndices.map((i) => englishWordlist[i]).join(' '); } // diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js index 730be9d44..41b429334 100644 --- a/app/scripts/metamask-controller.test.js +++ b/app/scripts/metamask-controller.test.js @@ -2,11 +2,11 @@ import { strict as assert } from 'assert'; import sinon from 'sinon'; import { cloneDeep } from 'lodash'; import nock from 'nock'; -import { pubToAddress, bufferToHex } from 'ethereumjs-util'; import { obj as createThoughStream } from 'through2'; import EthQuery from 'eth-query'; import proxyquire from 'proxyquire'; import browser from 'webextension-polyfill'; +import { wordlist as englishWordlist } from '@metamask/scure-bip39/dist/wordlists/english'; import { TransactionStatus } from '../../shared/constants/transaction'; import createTxMeta from '../../test/lib/createTxMeta'; import { NETWORK_TYPES } from '../../shared/constants/network'; @@ -14,7 +14,7 @@ import { HardwareDeviceNames, HardwareKeyringTypes, } from '../../shared/constants/hardware-wallets'; -import { addHexPrefix, deferredPromise } from './lib/util'; +import { deferredPromise } from './lib/util'; const Ganache = require('../../test/e2e/ganache'); @@ -209,13 +209,15 @@ describe('MetaMaskController', function () { metamaskController.keyringController.getKeyringsByType( HardwareKeyringTypes.imported, ); - const privKeyBuffer = simpleKeyrings[0].wallets[0].privateKey; - const pubKeyBuffer = simpleKeyrings[0].wallets[0].publicKey; - const addressBuffer = pubToAddress(pubKeyBuffer); - const privKey = bufferToHex(privKeyBuffer); - const pubKey = bufferToHex(addressBuffer); - assert.equal(privKey, addHexPrefix(importPrivkey)); - assert.equal(pubKey, '0xe18035bf8712672935fdb4e5e431b1a0183d2dfc'); + const pubAddressHexArr = await simpleKeyrings[0].getAccounts(); + const privKeyHex = await simpleKeyrings[0].exportAccount( + pubAddressHexArr[0], + ); + assert.equal(privKeyHex, importPrivkey); + assert.equal( + pubAddressHexArr[0], + '0xe18035bf8712672935fdb4e5e431b1a0183d2dfc', + ); }); it('adds 1 account', async function () { @@ -511,6 +513,31 @@ describe('MetaMaskController', function () { }); }); + describe('getPrimaryKeyringMnemonic', function () { + it('should return a mnemonic as a string', function () { + const mockMnemonic = + 'above mercy benefit hospital call oval domain student sphere interest argue shock'; + const mnemonicIndices = mockMnemonic + .split(' ') + .map((word) => englishWordlist.indexOf(word)); + const uint8ArrayMnemonic = new Uint8Array( + new Uint16Array(mnemonicIndices).buffer, + ); + + const mockHDKeyring = { + type: 'HD Key Tree', + mnemonic: uint8ArrayMnemonic, + }; + sinon + .stub(metamaskController.keyringController, 'getKeyringsByType') + .returns([mockHDKeyring]); + + const recoveredMnemonic = metamaskController.getPrimaryKeyringMnemonic(); + + assert.equal(recoveredMnemonic, mockMnemonic); + }); + }); + describe('checkHardwareStatus', function () { it('should throw if it receives an unknown device name', async function () { try { @@ -691,11 +718,8 @@ describe('MetaMaskController', function () { } }); - beforeEach(async function () { - await metamaskController.createNewVaultAndKeychain('password'); - }); - it('#addNewAccount', async function () { + await metamaskController.createNewVaultAndKeychain('password'); await metamaskController.addNewAccount(1); const getAccounts = await metamaskController.keyringController.getAccounts(); diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 46eca0fc7..bdb811f28 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -653,6 +653,75 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/eth-keyring-controller": { + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, + "@metamask/eth-keyring-controller>obs-store": true, + "@metamask/rpc-methods>@metamask/browser-passworder": true, + "browserify>events": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": { + "globals": { + "TextEncoder": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true, + "@metamask/scure-bip39": true, + "browserify>buffer": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, + "eth-lattice-keyring>@ethereumjs/util": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography>@noble/hashes": true, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@scure/bip32": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": { + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true, + "browserify>buffer": true, + "browserify>events": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, + "eth-lattice-keyring>@ethereumjs/util": true, + "ethereumjs-wallet>randombytes": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/eth-keyring-controller>obs-store": { + "packages": { + "safe-event-emitter": true, + "watchify>xtend": true + } + }, "@metamask/eth-ledger-bridge-keyring": { "globals": { "addEventListener": true, @@ -1008,6 +1077,15 @@ "crypto.getRandomValues": true } }, + "@metamask/scure-bip39": { + "globals": { + "TextEncoder": true + }, + "packages": { + "@metamask/snaps-utils>@noble/hashes": true, + "@metamask/snaps-utils>@scure/base": true + } + }, "@metamask/smart-transactions-controller": { "globals": { "URLSearchParams": true, @@ -2207,8 +2285,8 @@ }, "eth-json-rpc-middleware>@metamask/eth-sig-util": { "packages": { + "bn.js": true, "browserify>buffer": true, - "eth-json-rpc-middleware>@metamask/eth-sig-util>bn.js": true, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": true, "eth-lattice-keyring>@ethereumjs/util": true, @@ -2216,11 +2294,6 @@ "eth-sig-util>tweetnacl-util": true } }, - "eth-json-rpc-middleware>@metamask/eth-sig-util>bn.js": { - "packages": { - "browserify>browser-resolve": true - } - }, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": { "globals": { "TextDecoder": true, @@ -2243,95 +2316,11 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, - "eth-keyring-controller": { - "packages": { - "@metamask/rpc-methods>@metamask/browser-passworder": true, - "browserify>buffer": true, - "browserify>events": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring": true, - "eth-keyring-controller>eth-simple-keyring": true, - "eth-keyring-controller>obs-store": true, - "eth-sig-util": true - } - }, - "eth-keyring-controller>@metamask/bip39": { - "packages": { - "browserify>buffer": true, - "browserify>crypto-browserify>pbkdf2": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-wallet>randombytes": true - } - }, "eth-keyring-controller>@metamask/browser-passworder": { "globals": { "crypto": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring": { - "packages": { - "browserify>buffer": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": true, - "eth-keyring-controller>eth-simple-keyring": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true - } - }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": { - "packages": { - "@truffle/codec>utf8": true, - "browserify>buffer": true, - "browserify>crypto-browserify": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": true, - "ethereumjs-util": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-wallet>aes-js": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true - } - }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": { - "globals": { - "crypto": true, - "msCrypto": true - } - }, - "eth-keyring-controller>eth-simple-keyring": { - "packages": { - "browserify>buffer": true, - "browserify>events": true, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet": true, - "eth-sig-util": true, - "ethereumjs-util": true - } - }, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet": { - "packages": { - "@truffle/codec>utf8": true, - "browserify>buffer": true, - "browserify>crypto-browserify": true, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet>uuid": true, - "ethereumjs-util": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-wallet>aes-js": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true - } - }, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet>uuid": { - "globals": { - "crypto": true, - "msCrypto": true - } - }, - "eth-keyring-controller>obs-store": { - "packages": { - "safe-event-emitter": true, - "watchify>xtend": true - } - }, "eth-lattice-keyring": { "globals": { "addEventListener": true, @@ -2361,10 +2350,15 @@ } }, "eth-lattice-keyring>@ethereumjs/util": { + "globals": { + "console.warn": true + }, "packages": { "browserify>buffer": true, + "browserify>events": true, "browserify>insert-module-globals>is-buffer": true, "eth-lattice-keyring>@ethereumjs/util>@ethereumjs/rlp": true, + "eth-lattice-keyring>@ethereumjs/util>async": true, "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography": true } }, @@ -2373,6 +2367,19 @@ "TextEncoder": true } }, + "eth-lattice-keyring>@ethereumjs/util>async": { + "globals": { + "clearTimeout": true, + "console": true, + "define": true, + "queueMicrotask": true, + "setTimeout": true + }, + "packages": { + "browserify>process": true, + "browserify>timers-browserify": true + } + }, "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography": { "globals": { "TextDecoder": true, @@ -2397,6 +2404,13 @@ "browserify>browser-resolve": true } }, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@scure/bip32": { + "packages": { + "@metamask/snaps-utils>@noble/hashes": true, + "@metamask/snaps-utils>@scure/base": true, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": true + } + }, "eth-lattice-keyring>bn.js": { "globals": { "Buffer": true @@ -2636,35 +2650,6 @@ "ethereumjs-util": true } }, - "eth-trezor-keyring>@metamask/eth-sig-util": { - "packages": { - "browserify>buffer": true, - "eth-sig-util>tweetnacl": true, - "eth-sig-util>tweetnacl-util": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethereumjs-util": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": true, - "ethereumjs-abi": true - } - }, - "eth-trezor-keyring>@metamask/eth-sig-util>ethereumjs-util": { - "packages": { - "bn.js": true, - "browserify>assert": true, - "browserify>buffer": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-util>rlp": true, - "ethers>@ethersproject/signing-key>elliptic": true - } - }, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": { - "packages": { - "browserify>buffer": true, - "ethjs>ethjs-util>is-hex-prefixed": true, - "ethjs>ethjs-util>strip-hex-prefix": true - } - }, "eth-trezor-keyring>hdkey": { "packages": { "browserify>assert": true, @@ -2720,7 +2705,7 @@ "packages": { "@babel/runtime": true, "browserify>events": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, "eth-trezor-keyring>trezor-connect>cross-fetch": true } }, @@ -2829,15 +2814,10 @@ }, "ethereumjs-util>ethereum-cryptography": { "packages": { - "browserify>assert": true, "browserify>buffer": true, - "browserify>crypto-browserify>create-hmac": true, "ethereumjs-util>ethereum-cryptography>keccak": true, "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/sha2>hash.js": true + "ethereumjs-wallet>randombytes": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 2040dc784..80c7fba2d 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -653,6 +653,75 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/eth-keyring-controller": { + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, + "@metamask/eth-keyring-controller>obs-store": true, + "@metamask/rpc-methods>@metamask/browser-passworder": true, + "browserify>events": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": { + "globals": { + "TextEncoder": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true, + "@metamask/scure-bip39": true, + "browserify>buffer": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, + "eth-lattice-keyring>@ethereumjs/util": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography>@noble/hashes": true, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@scure/bip32": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": { + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true, + "browserify>buffer": true, + "browserify>events": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, + "eth-lattice-keyring>@ethereumjs/util": true, + "ethereumjs-wallet>randombytes": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/eth-keyring-controller>obs-store": { + "packages": { + "safe-event-emitter": true, + "watchify>xtend": true + } + }, "@metamask/eth-ledger-bridge-keyring": { "globals": { "addEventListener": true, @@ -1103,6 +1172,15 @@ "crypto.getRandomValues": true } }, + "@metamask/scure-bip39": { + "globals": { + "TextEncoder": true + }, + "packages": { + "@metamask/snaps-utils>@noble/hashes": true, + "@metamask/snaps-utils>@scure/base": true + } + }, "@metamask/smart-transactions-controller": { "globals": { "URLSearchParams": true, @@ -2532,8 +2610,8 @@ }, "eth-json-rpc-middleware>@metamask/eth-sig-util": { "packages": { + "bn.js": true, "browserify>buffer": true, - "eth-json-rpc-middleware>@metamask/eth-sig-util>bn.js": true, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": true, "eth-lattice-keyring>@ethereumjs/util": true, @@ -2541,11 +2619,6 @@ "eth-sig-util>tweetnacl-util": true } }, - "eth-json-rpc-middleware>@metamask/eth-sig-util>bn.js": { - "packages": { - "browserify>browser-resolve": true - } - }, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": { "globals": { "TextDecoder": true, @@ -2568,95 +2641,11 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, - "eth-keyring-controller": { - "packages": { - "@metamask/rpc-methods>@metamask/browser-passworder": true, - "browserify>buffer": true, - "browserify>events": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring": true, - "eth-keyring-controller>eth-simple-keyring": true, - "eth-keyring-controller>obs-store": true, - "eth-sig-util": true - } - }, - "eth-keyring-controller>@metamask/bip39": { - "packages": { - "browserify>buffer": true, - "browserify>crypto-browserify>pbkdf2": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-wallet>randombytes": true - } - }, "eth-keyring-controller>@metamask/browser-passworder": { "globals": { "crypto": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring": { - "packages": { - "browserify>buffer": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": true, - "eth-keyring-controller>eth-simple-keyring": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true - } - }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": { - "packages": { - "@truffle/codec>utf8": true, - "browserify>buffer": true, - "browserify>crypto-browserify": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": true, - "ethereumjs-util": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-wallet>aes-js": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true - } - }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": { - "globals": { - "crypto": true, - "msCrypto": true - } - }, - "eth-keyring-controller>eth-simple-keyring": { - "packages": { - "browserify>buffer": true, - "browserify>events": true, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet": true, - "eth-sig-util": true, - "ethereumjs-util": true - } - }, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet": { - "packages": { - "@truffle/codec>utf8": true, - "browserify>buffer": true, - "browserify>crypto-browserify": true, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet>uuid": true, - "ethereumjs-util": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-wallet>aes-js": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true - } - }, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet>uuid": { - "globals": { - "crypto": true, - "msCrypto": true - } - }, - "eth-keyring-controller>obs-store": { - "packages": { - "safe-event-emitter": true, - "watchify>xtend": true - } - }, "eth-lattice-keyring": { "globals": { "addEventListener": true, @@ -2686,10 +2675,15 @@ } }, "eth-lattice-keyring>@ethereumjs/util": { + "globals": { + "console.warn": true + }, "packages": { "browserify>buffer": true, + "browserify>events": true, "browserify>insert-module-globals>is-buffer": true, "eth-lattice-keyring>@ethereumjs/util>@ethereumjs/rlp": true, + "eth-lattice-keyring>@ethereumjs/util>async": true, "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography": true } }, @@ -2698,6 +2692,19 @@ "TextEncoder": true } }, + "eth-lattice-keyring>@ethereumjs/util>async": { + "globals": { + "clearTimeout": true, + "console": true, + "define": true, + "queueMicrotask": true, + "setTimeout": true + }, + "packages": { + "browserify>process": true, + "browserify>timers-browserify": true + } + }, "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography": { "globals": { "TextDecoder": true, @@ -2722,6 +2729,13 @@ "browserify>browser-resolve": true } }, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@scure/bip32": { + "packages": { + "@metamask/snaps-utils>@noble/hashes": true, + "@metamask/snaps-utils>@scure/base": true, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": true + } + }, "eth-lattice-keyring>bn.js": { "globals": { "Buffer": true @@ -2961,35 +2975,6 @@ "ethereumjs-util": true } }, - "eth-trezor-keyring>@metamask/eth-sig-util": { - "packages": { - "browserify>buffer": true, - "eth-sig-util>tweetnacl": true, - "eth-sig-util>tweetnacl-util": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethereumjs-util": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": true, - "ethereumjs-abi": true - } - }, - "eth-trezor-keyring>@metamask/eth-sig-util>ethereumjs-util": { - "packages": { - "bn.js": true, - "browserify>assert": true, - "browserify>buffer": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-util>rlp": true, - "ethers>@ethersproject/signing-key>elliptic": true - } - }, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": { - "packages": { - "browserify>buffer": true, - "ethjs>ethjs-util>is-hex-prefixed": true, - "ethjs>ethjs-util>strip-hex-prefix": true - } - }, "eth-trezor-keyring>hdkey": { "packages": { "browserify>assert": true, @@ -3045,7 +3030,7 @@ "packages": { "@babel/runtime": true, "browserify>events": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, "eth-trezor-keyring>trezor-connect>cross-fetch": true } }, @@ -3154,15 +3139,10 @@ }, "ethereumjs-util>ethereum-cryptography": { "packages": { - "browserify>assert": true, "browserify>buffer": true, - "browserify>crypto-browserify>create-hmac": true, "ethereumjs-util>ethereum-cryptography>keccak": true, "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/sha2>hash.js": true + "ethereumjs-wallet>randombytes": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 46eca0fc7..bdb811f28 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -653,6 +653,75 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/eth-keyring-controller": { + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, + "@metamask/eth-keyring-controller>obs-store": true, + "@metamask/rpc-methods>@metamask/browser-passworder": true, + "browserify>events": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": { + "globals": { + "TextEncoder": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true, + "@metamask/scure-bip39": true, + "browserify>buffer": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, + "eth-lattice-keyring>@ethereumjs/util": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography>@noble/hashes": true, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@scure/bip32": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": { + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true, + "browserify>buffer": true, + "browserify>events": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, + "eth-lattice-keyring>@ethereumjs/util": true, + "ethereumjs-wallet>randombytes": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": { + "globals": { + "TextDecoder": true, + "crypto": true + }, + "packages": { + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography>@noble/hashes": true + } + }, + "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography>@noble/hashes": { + "globals": { + "TextEncoder": true, + "crypto": true + } + }, + "@metamask/eth-keyring-controller>obs-store": { + "packages": { + "safe-event-emitter": true, + "watchify>xtend": true + } + }, "@metamask/eth-ledger-bridge-keyring": { "globals": { "addEventListener": true, @@ -1008,6 +1077,15 @@ "crypto.getRandomValues": true } }, + "@metamask/scure-bip39": { + "globals": { + "TextEncoder": true + }, + "packages": { + "@metamask/snaps-utils>@noble/hashes": true, + "@metamask/snaps-utils>@scure/base": true + } + }, "@metamask/smart-transactions-controller": { "globals": { "URLSearchParams": true, @@ -2207,8 +2285,8 @@ }, "eth-json-rpc-middleware>@metamask/eth-sig-util": { "packages": { + "bn.js": true, "browserify>buffer": true, - "eth-json-rpc-middleware>@metamask/eth-sig-util>bn.js": true, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": true, "eth-lattice-keyring>@ethereumjs/util": true, @@ -2216,11 +2294,6 @@ "eth-sig-util>tweetnacl-util": true } }, - "eth-json-rpc-middleware>@metamask/eth-sig-util>bn.js": { - "packages": { - "browserify>browser-resolve": true - } - }, "eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": { "globals": { "TextDecoder": true, @@ -2243,95 +2316,11 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, - "eth-keyring-controller": { - "packages": { - "@metamask/rpc-methods>@metamask/browser-passworder": true, - "browserify>buffer": true, - "browserify>events": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring": true, - "eth-keyring-controller>eth-simple-keyring": true, - "eth-keyring-controller>obs-store": true, - "eth-sig-util": true - } - }, - "eth-keyring-controller>@metamask/bip39": { - "packages": { - "browserify>buffer": true, - "browserify>crypto-browserify>pbkdf2": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-wallet>randombytes": true - } - }, "eth-keyring-controller>@metamask/browser-passworder": { "globals": { "crypto": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring": { - "packages": { - "browserify>buffer": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": true, - "eth-keyring-controller>eth-simple-keyring": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true - } - }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": { - "packages": { - "@truffle/codec>utf8": true, - "browserify>buffer": true, - "browserify>crypto-browserify": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": true, - "ethereumjs-util": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-wallet>aes-js": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true - } - }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": { - "globals": { - "crypto": true, - "msCrypto": true - } - }, - "eth-keyring-controller>eth-simple-keyring": { - "packages": { - "browserify>buffer": true, - "browserify>events": true, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet": true, - "eth-sig-util": true, - "ethereumjs-util": true - } - }, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet": { - "packages": { - "@truffle/codec>utf8": true, - "browserify>buffer": true, - "browserify>crypto-browserify": true, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet>uuid": true, - "ethereumjs-util": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-wallet>aes-js": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true - } - }, - "eth-keyring-controller>eth-simple-keyring>ethereumjs-wallet>uuid": { - "globals": { - "crypto": true, - "msCrypto": true - } - }, - "eth-keyring-controller>obs-store": { - "packages": { - "safe-event-emitter": true, - "watchify>xtend": true - } - }, "eth-lattice-keyring": { "globals": { "addEventListener": true, @@ -2361,10 +2350,15 @@ } }, "eth-lattice-keyring>@ethereumjs/util": { + "globals": { + "console.warn": true + }, "packages": { "browserify>buffer": true, + "browserify>events": true, "browserify>insert-module-globals>is-buffer": true, "eth-lattice-keyring>@ethereumjs/util>@ethereumjs/rlp": true, + "eth-lattice-keyring>@ethereumjs/util>async": true, "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography": true } }, @@ -2373,6 +2367,19 @@ "TextEncoder": true } }, + "eth-lattice-keyring>@ethereumjs/util>async": { + "globals": { + "clearTimeout": true, + "console": true, + "define": true, + "queueMicrotask": true, + "setTimeout": true + }, + "packages": { + "browserify>process": true, + "browserify>timers-browserify": true + } + }, "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography": { "globals": { "TextDecoder": true, @@ -2397,6 +2404,13 @@ "browserify>browser-resolve": true } }, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@scure/bip32": { + "packages": { + "@metamask/snaps-utils>@noble/hashes": true, + "@metamask/snaps-utils>@scure/base": true, + "eth-lattice-keyring>@ethereumjs/util>ethereum-cryptography>@noble/secp256k1": true + } + }, "eth-lattice-keyring>bn.js": { "globals": { "Buffer": true @@ -2636,35 +2650,6 @@ "ethereumjs-util": true } }, - "eth-trezor-keyring>@metamask/eth-sig-util": { - "packages": { - "browserify>buffer": true, - "eth-sig-util>tweetnacl": true, - "eth-sig-util>tweetnacl-util": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethereumjs-util": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": true, - "ethereumjs-abi": true - } - }, - "eth-trezor-keyring>@metamask/eth-sig-util>ethereumjs-util": { - "packages": { - "bn.js": true, - "browserify>assert": true, - "browserify>buffer": true, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, - "ethereumjs-util>rlp": true, - "ethers>@ethersproject/signing-key>elliptic": true - } - }, - "eth-trezor-keyring>@metamask/eth-sig-util>ethjs-util": { - "packages": { - "browserify>buffer": true, - "ethjs>ethjs-util>is-hex-prefixed": true, - "ethjs>ethjs-util>strip-hex-prefix": true - } - }, "eth-trezor-keyring>hdkey": { "packages": { "browserify>assert": true, @@ -2720,7 +2705,7 @@ "packages": { "@babel/runtime": true, "browserify>events": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true, + "eth-json-rpc-middleware>@metamask/eth-sig-util": true, "eth-trezor-keyring>trezor-connect>cross-fetch": true } }, @@ -2829,15 +2814,10 @@ }, "ethereumjs-util>ethereum-cryptography": { "packages": { - "browserify>assert": true, "browserify>buffer": true, - "browserify>crypto-browserify>create-hmac": true, "ethereumjs-util>ethereum-cryptography>keccak": true, "ethereumjs-util>ethereum-cryptography>secp256k1": true, - "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>randombytes": true, - "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/sha2>hash.js": true + "ethereumjs-wallet>randombytes": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { diff --git a/package.json b/package.json index 1a1b60452..ce3abf34b 100644 --- a/package.json +++ b/package.json @@ -220,6 +220,7 @@ "@metamask/controller-utils": "^1.0.0", "@metamask/design-tokens": "^1.9.0", "@metamask/eth-json-rpc-infura": "^7.0.0", + "@metamask/eth-keyring-controller": "^10.0.0", "@metamask/eth-ledger-bridge-keyring": "^0.13.0", "@metamask/eth-token-tracker": "^4.0.0", "@metamask/etherscan-link": "^2.2.0", @@ -235,6 +236,7 @@ "@metamask/providers": "^10.2.1", "@metamask/rate-limit-controller": "^1.0.0", "@metamask/rpc-methods": "^0.27.1", + "@metamask/scure-bip39": "^2.0.3", "@metamask/slip44": "^2.1.0", "@metamask/smart-transactions-controller": "^3.1.0", "@metamask/snaps-controllers": "^0.27.1", @@ -270,7 +272,6 @@ "eth-ens-namehash": "^2.0.8", "eth-json-rpc-filters": "^5.1.0", "eth-json-rpc-middleware": "^9.0.1", - "eth-keyring-controller": "^8.1.0", "eth-lattice-keyring": "^0.12.3", "eth-method-registry": "^2.0.0", "eth-query": "^2.1.2", diff --git a/yarn.lock b/yarn.lock index 2ee2a7ae2..1914af3ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2027,13 +2027,14 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/util@npm:^8.0.0": - version: 8.0.0 - resolution: "@ethereumjs/util@npm:8.0.0" +"@ethereumjs/util@npm:^8.0.0, @ethereumjs/util@npm:^8.0.2": + version: 8.0.3 + resolution: "@ethereumjs/util@npm:8.0.3" dependencies: "@ethereumjs/rlp": ^4.0.0-beta.2 + async: ^3.2.4 ethereum-cryptography: ^1.1.2 - checksum: 360e9795e120f15eba4d683260eca64071f9020eaa9d7276c0cdd80d837933757c0c089ba578a10ad0cfef51118d87649e1c6722a10385991590c4cf51eba62b + checksum: f41b9b1f491d65393fe33431ad2c723bdbf405358e201af3bd9ed2dbf04b6002f039e425681534084fd9b4b11d8c27d2ba521682fe2f49518f6891833246a698 languageName: node linkType: hard @@ -3605,19 +3606,7 @@ __metadata: languageName: node linkType: hard -"@metamask/bip39@npm:^4.0.0": - version: 4.0.0 - resolution: "@metamask/bip39@npm:4.0.0" - dependencies: - "@types/node": 11.11.6 - create-hash: ^1.1.0 - pbkdf2: ^3.0.9 - randombytes: ^2.0.1 - checksum: 0d629de806dd0a6c6ea2ff4ab4752931b15eda5abcf2975f3beed8b4161bcc4765ec97bd8ba0146059b10178f6cf1753f74223655908bc585a76b565f26d4f16 - languageName: node - linkType: hard - -"@metamask/browser-passworder@npm:^4.0.1, @metamask/browser-passworder@npm:^4.0.2": +"@metamask/browser-passworder@npm:^4.0.2": version: 4.0.2 resolution: "@metamask/browser-passworder@npm:4.0.2" checksum: 997c330b1c72f7135d0fd2a7f4b0dce37b3c2e6b30e92f048fa8d4f8c949f5b669dcc3064790f41df30ee2e53a9e64a812df72e00527736be704cce2cf4f6e49 @@ -3712,16 +3701,15 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-hd-keyring@npm:^4.0.2": - version: 4.0.2 - resolution: "@metamask/eth-hd-keyring@npm:4.0.2" +"@metamask/eth-hd-keyring@npm:^6.0.0": + version: 6.0.0 + resolution: "@metamask/eth-hd-keyring@npm:6.0.0" dependencies: - "@metamask/bip39": ^4.0.0 - "@metamask/eth-sig-util": ^4.0.0 - eth-simple-keyring: ^4.2.0 - ethereumjs-util: ^7.0.9 - ethereumjs-wallet: ^1.0.1 - checksum: a390fe8baa71fa1e8416e20038c6d3e2b435ae0e7089d48f9ac5067e257971282d3cf2b8e7fcc0985c6cf0aa2839ea678ec92bc32aba02b764b18081f1f28d5e + "@ethereumjs/util": ^8.0.2 + "@metamask/eth-sig-util": ^5.0.2 + "@metamask/scure-bip39": ^2.0.3 + ethereum-cryptography: ^1.1.2 + checksum: 2f1b05c1bdb001f1529bedcd05ef4bcca43af5c8d64742ec1b2feed341edab565bff7f66ef3834ae1a451b23532bda20ac3579c62dde2201330af01025d1497a languageName: node linkType: hard @@ -3738,6 +3726,19 @@ __metadata: languageName: node linkType: hard +"@metamask/eth-keyring-controller@npm:^10.0.0": + version: 10.0.0 + resolution: "@metamask/eth-keyring-controller@npm:10.0.0" + dependencies: + "@metamask/browser-passworder": ^4.0.2 + "@metamask/eth-hd-keyring": ^6.0.0 + "@metamask/eth-sig-util": 5.0.2 + "@metamask/eth-simple-keyring": ^5.0.0 + obs-store: ^4.0.3 + checksum: 6b06a74ae5da610289a4f5a7018b55d17d55b3d533fcd2d1675704902575d435373e4c2b3f4a019f6c14492f326e0dbfe7c04bd94ae8ebc38382fbe3b9c86b7c + languageName: node + linkType: hard + "@metamask/eth-ledger-bridge-keyring@npm:^0.13.0": version: 0.13.0 resolution: "@metamask/eth-ledger-bridge-keyring@npm:0.13.0" @@ -3750,6 +3751,20 @@ __metadata: languageName: node linkType: hard +"@metamask/eth-sig-util@npm:5.0.2, @metamask/eth-sig-util@npm:^5.0.0, @metamask/eth-sig-util@npm:^5.0.1, @metamask/eth-sig-util@npm:^5.0.2": + version: 5.0.2 + resolution: "@metamask/eth-sig-util@npm:5.0.2" + dependencies: + "@ethereumjs/util": ^8.0.0 + bn.js: ^4.11.8 + ethereum-cryptography: ^1.1.2 + ethjs-util: ^0.1.6 + tweetnacl: ^1.0.3 + tweetnacl-util: ^0.15.1 + checksum: 1fbf1a0f5e654058f0219c9018dbebadf53036c9c3b47c8faf1cac54816532bb18996821736f526ac4e3d579afcaf502af4ad07e88158a50f015141858b08a90 + languageName: node + linkType: hard + "@metamask/eth-sig-util@npm:^4.0.0": version: 4.0.0 resolution: "@metamask/eth-sig-util@npm:4.0.0" @@ -3763,17 +3778,15 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-sig-util@npm:^5.0.0": +"@metamask/eth-simple-keyring@npm:^5.0.0": version: 5.0.0 - resolution: "@metamask/eth-sig-util@npm:5.0.0" + resolution: "@metamask/eth-simple-keyring@npm:5.0.0" dependencies: "@ethereumjs/util": ^8.0.0 - bn.js: 4.11.8 + "@metamask/eth-sig-util": ^5.0.1 ethereum-cryptography: ^1.1.2 - ethjs-util: ^0.1.6 - tweetnacl: ^1.0.3 - tweetnacl-util: ^0.15.1 - checksum: a2353e92c403d448f34a6e84e360046cce2babea12b38f662689e15c364333afeb3c3677d95c24716f09c1a6d0998002117fb12c595ef08bed2d421956aa592e + randombytes: ^2.1.0 + checksum: 6fd05173531b84f6fb816b90ab8cfb176ac3300f07daa51c4adac673fa17dbcc6ce1ebdf064b9f66549f37476bbc54eb2dd9d28935d57654ef62b935a1e31e1d languageName: node linkType: hard @@ -4076,6 +4089,16 @@ __metadata: languageName: node linkType: hard +"@metamask/scure-bip39@npm:^2.0.3": + version: 2.0.3 + resolution: "@metamask/scure-bip39@npm:2.0.3" + dependencies: + "@noble/hashes": ~1.1.1 + "@scure/base": ~1.1.0 + checksum: a1655adbab6165c833db7e1a2f46a9617503b79016b06e025e15babd5ba8bce682598fe939851ce88fff451c9833e0362003c9ba7c68b3bf1e7cc09bdfe9fa4c + languageName: node + linkType: hard + "@metamask/slip44@npm:^2.1.0": version: 2.1.0 resolution: "@metamask/slip44@npm:2.1.0" @@ -7260,13 +7283,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:11.11.6": - version: 11.11.6 - resolution: "@types/node@npm:11.11.6" - checksum: 075f1c011cf568e49701419acbcb55c24906b3bb5a34d9412a3b88f228a7a78401a5ad4d3e1cd6855c99aaea5ef96e37fc86ca097e50f06da92cf822befc1fff - languageName: node - linkType: hard - "@types/node@npm:^12.0.12": version: 12.19.15 resolution: "@types/node@npm:12.19.15" @@ -9540,6 +9556,13 @@ __metadata: languageName: node linkType: hard +"async@npm:^3.2.4": + version: 3.2.4 + resolution: "async@npm:3.2.4" + checksum: 43d07459a4e1d09b84a20772414aa684ff4de085cbcaec6eea3c7a8f8150e8c62aa6cd4e699fe8ee93c3a5b324e777d34642531875a0817a35697522c1b02e89 + languageName: node + linkType: hard + "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -10305,13 +10328,6 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:4.11.8": - version: 4.11.8 - resolution: "bn.js@npm:4.11.8" - checksum: 80d4709cd58a21f0be8201e9e5859fea5ef133318e9800c8454cd334625c6e1caea593ca21f9b9a085fb560fbc12fb2fb3514363f8604258db924237fd039139 - languageName: node - linkType: hard - "bn.js@npm:>4.0.0, bn.js@npm:^5.1.1, bn.js@npm:^5.1.2, bn.js@npm:^5.1.3, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": version: 5.2.1 resolution: "bn.js@npm:5.2.1" @@ -15482,20 +15498,6 @@ __metadata: languageName: node linkType: hard -"eth-keyring-controller@npm:^8.1.0": - version: 8.1.0 - resolution: "eth-keyring-controller@npm:8.1.0" - dependencies: - "@metamask/bip39": ^4.0.0 - "@metamask/browser-passworder": ^4.0.1 - "@metamask/eth-hd-keyring": ^4.0.2 - eth-sig-util: ^3.0.1 - eth-simple-keyring: ^4.2.0 - obs-store: ^4.0.3 - checksum: 71872cac6e0583dbebbc29e3eec337164f823ccc4f78ecd63c6d770f8f84a08390f240c33128bdc6139ddadf8ca2a2e850d2285e3bc1621a7743d6a7ffcb6f4c - languageName: node - linkType: hard - "eth-lattice-keyring@npm:^0.12.3": version: 0.12.3 resolution: "eth-lattice-keyring@npm:0.12.3" @@ -15588,7 +15590,7 @@ __metadata: languageName: node linkType: hard -"eth-sig-util@npm:^3.0.0, eth-sig-util@npm:^3.0.1": +"eth-sig-util@npm:^3.0.0": version: 3.0.1 resolution: "eth-sig-util@npm:3.0.1" dependencies: @@ -15600,18 +15602,6 @@ __metadata: languageName: node linkType: hard -"eth-simple-keyring@npm:^4.2.0": - version: 4.2.0 - resolution: "eth-simple-keyring@npm:4.2.0" - dependencies: - eth-sig-util: ^3.0.1 - ethereumjs-util: ^7.0.9 - ethereumjs-wallet: ^1.0.1 - events: ^1.1.1 - checksum: 5c6e03b2641905c3d58c0343e0d28d1192cdfd7da43ff8924c02ed50ff88cf1c66bb5e7057dec2fba9fe84ec467291e86c9ec0a8c72457214f7fe6a85984a259 - languageName: node - linkType: hard - "eth-trezor-keyring@npm:^0.10.0": version: 0.10.0 resolution: "eth-trezor-keyring@npm:0.10.0" @@ -15871,22 +15861,6 @@ __metadata: languageName: node linkType: hard -"ethereumjs-wallet@npm:^1.0.1": - version: 1.0.1 - resolution: "ethereumjs-wallet@npm:1.0.1" - dependencies: - aes-js: ^3.1.1 - bs58check: ^2.1.2 - ethereum-cryptography: ^0.1.3 - ethereumjs-util: ^7.0.2 - randombytes: ^2.0.6 - scrypt-js: ^3.0.1 - utf8: ^3.0.0 - uuid: ^3.3.2 - checksum: 1b95529e7e03403728a452668a3d95b44eb69def49a5d00ce8a2f01e64f9efeacc1742c8531ddf967612075dcd1843c1fdc160a68d351a121da07732d0112963 - languageName: node - linkType: hard - "ethers@npm:^5.0.13, ethers@npm:^5.6.4": version: 5.7.2 resolution: "ethers@npm:5.7.2" @@ -16146,13 +16120,6 @@ __metadata: languageName: node linkType: hard -"events@npm:^1.1.1": - version: 1.1.1 - resolution: "events@npm:1.1.1" - checksum: 40431eb005cc4c57861b93d44c2981a49e7feb99df84cf551baed299ceea4444edf7744733f6a6667e942af687359b1f4a87ec1ec4f21d5127dac48a782039b9 - languageName: node - linkType: hard - "events@npm:^2.0.0": version: 2.1.0 resolution: "events@npm:2.1.0" @@ -24132,6 +24099,7 @@ __metadata: "@metamask/eslint-config-nodejs": ^9.0.0 "@metamask/eslint-config-typescript": ^9.0.1 "@metamask/eth-json-rpc-infura": ^7.0.0 + "@metamask/eth-keyring-controller": ^10.0.0 "@metamask/eth-ledger-bridge-keyring": ^0.13.0 "@metamask/eth-token-tracker": ^4.0.0 "@metamask/etherscan-link": ^2.2.0 @@ -24149,6 +24117,7 @@ __metadata: "@metamask/providers": ^10.2.1 "@metamask/rate-limit-controller": ^1.0.0 "@metamask/rpc-methods": ^0.27.1 + "@metamask/scure-bip39": ^2.0.3 "@metamask/slip44": ^2.1.0 "@metamask/smart-transactions-controller": ^3.1.0 "@metamask/snaps-controllers": ^0.27.1 @@ -24259,7 +24228,6 @@ __metadata: eth-ens-namehash: ^2.0.8 eth-json-rpc-filters: ^5.1.0 eth-json-rpc-middleware: ^9.0.1 - eth-keyring-controller: ^8.1.0 eth-lattice-keyring: ^0.12.3 eth-method-registry: ^2.0.0 eth-query: ^2.1.2 @@ -27005,7 +26973,7 @@ __metadata: languageName: node linkType: hard -"pbkdf2@npm:^3.0.17, pbkdf2@npm:^3.0.3, pbkdf2@npm:^3.0.9": +"pbkdf2@npm:^3.0.17, pbkdf2@npm:^3.0.3": version: 3.1.2 resolution: "pbkdf2@npm:3.1.2" dependencies: @@ -30575,7 +30543,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.1, scrypt-js@npm:^3.0.0": version: 3.0.1 resolution: "scrypt-js@npm:3.0.1" checksum: b7c7d1a68d6ca946f2fbb0778e0c4ec63c65501b54023b2af7d7e9f48fdb6c6580d6f7675cd53bda5944c5ebc057560d5a6365079752546865defb3b79dea454