diff --git a/app/scripts/controllers/account-tracker-controller.test.ts b/app/scripts/controllers/account-tracker-controller.test.ts index 7456244fc5a4..d9090c2e67f8 100644 --- a/app/scripts/controllers/account-tracker-controller.test.ts +++ b/app/scripts/controllers/account-tracker-controller.test.ts @@ -1,6 +1,6 @@ import EventEmitter from 'events'; import { ControllerMessenger } from '@metamask/base-controller'; -import { InternalAccount } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { BlockTracker, Provider } from '@metamask/network-controller'; import { flushPromises } from '../../../test/lib/timer-helpers'; diff --git a/app/scripts/controllers/account-tracker-controller.ts b/app/scripts/controllers/account-tracker-controller.ts index 5f509a1901bf..ec6ba74ceec2 100644 --- a/app/scripts/controllers/account-tracker-controller.ts +++ b/app/scripts/controllers/account-tracker-controller.ts @@ -36,7 +36,7 @@ import { AccountsControllerSelectedEvmAccountChangeEvent, } from '@metamask/accounts-controller'; import { KeyringControllerAccountRemovedEvent } from '@metamask/keyring-controller'; -import { InternalAccount } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { LOCALHOST_RPC_URL } from '../../../shared/constants/network'; import { SINGLE_CALL_BALANCES_ADDRESSES } from '../constants/contracts'; diff --git a/app/scripts/controllers/metametrics-controller.test.ts b/app/scripts/controllers/metametrics-controller.test.ts index bee3c3c323d2..939d8e506070 100644 --- a/app/scripts/controllers/metametrics-controller.test.ts +++ b/app/scripts/controllers/metametrics-controller.test.ts @@ -10,7 +10,7 @@ import { Token, TokensControllerState, } from '@metamask/assets-controllers'; -import { InternalAccount } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { Browser } from 'webextension-polyfill'; import { ControllerMessenger } from '@metamask/base-controller'; import { merge } from 'lodash'; diff --git a/app/scripts/controllers/mmi-controller.ts b/app/scripts/controllers/mmi-controller.ts index f94388aa5e8f..7378585a7e8f 100644 --- a/app/scripts/controllers/mmi-controller.ts +++ b/app/scripts/controllers/mmi-controller.ts @@ -27,8 +27,8 @@ import { OriginalRequest, SignatureController, } from '@metamask/signature-controller'; -import { InternalAccount } from '@metamask/keyring-api'; import { toHex } from '@metamask/controller-utils'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; // TODO: Remove restricted import // eslint-disable-next-line import/no-restricted-paths diff --git a/app/scripts/controllers/permissions/specifications.js b/app/scripts/controllers/permissions/specifications.js index b0b2051b10f5..38a2bb002523 100644 --- a/app/scripts/controllers/permissions/specifications.js +++ b/app/scripts/controllers/permissions/specifications.js @@ -47,7 +47,7 @@ export const CaveatFactories = Object.freeze({ * PermissionController. * * @param {{ - * getInternalAccounts: () => Record, + * getInternalAccounts: () => Record, * }} options - Options bag. */ export const getCaveatSpecifications = ({ @@ -96,7 +96,7 @@ export const getCaveatSpecifications = ({ * * @param {{ * getAllAccounts: () => Promise, - * getInternalAccounts: () => Record, + * getInternalAccounts: () => Record, * }} options - Options bag. * @param options.getAllAccounts - A function that returns all Ethereum accounts * in the current MetaMask instance. @@ -254,7 +254,7 @@ export const getPermissionSpecifications = ({ * corresponds to a PreferencesController identity. * * @param {string[]} accounts - The accounts associated with the caveat. - * @param {() => Record} getInternalAccounts - + * @param {() => Record} getInternalAccounts - * Gets all AccountsController InternalAccounts. */ function validateCaveatAccounts(accounts, getInternalAccounts) { diff --git a/app/scripts/lib/AccountIdentitiesPetnamesBridge.ts b/app/scripts/lib/AccountIdentitiesPetnamesBridge.ts index 87f4d114eabb..dac123744772 100644 --- a/app/scripts/lib/AccountIdentitiesPetnamesBridge.ts +++ b/app/scripts/lib/AccountIdentitiesPetnamesBridge.ts @@ -4,7 +4,7 @@ import { NameType, NameOrigin, } from '@metamask/name-controller'; -import { InternalAccount } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { AccountsControllerChangeEvent, AccountsControllerListAccountsAction, diff --git a/app/scripts/lib/accounts/BalancesController.test.ts b/app/scripts/lib/accounts/BalancesController.test.ts index 982df0289fea..e18fbc1e7be8 100644 --- a/app/scripts/lib/accounts/BalancesController.test.ts +++ b/app/scripts/lib/accounts/BalancesController.test.ts @@ -1,10 +1,6 @@ import { ControllerMessenger } from '@metamask/base-controller'; -import { - Balance, - BtcAccountType, - CaipAssetType, - InternalAccount, -} from '@metamask/keyring-api'; +import { Balance, BtcAccountType, CaipAssetType } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { createMockInternalAccount } from '../../../../test/jest/mocks'; import { MultichainNetworks } from '../../../../shared/constants/multichain/networks'; import { diff --git a/app/scripts/lib/accounts/BalancesController.ts b/app/scripts/lib/accounts/BalancesController.ts index 588053d6ea2a..4b9616fac35f 100644 --- a/app/scripts/lib/accounts/BalancesController.ts +++ b/app/scripts/lib/accounts/BalancesController.ts @@ -8,13 +8,13 @@ import { } from '@metamask/base-controller'; import { BtcAccountType, - KeyringClient, + SolAccountType, + isEvmAccountType, type Balance, type CaipAssetType, - type InternalAccount, - isEvmAccountType, - SolAccountType, } from '@metamask/keyring-api'; +import { type InternalAccount } from '@metamask/keyring-internal-api'; +import { KeyringClient } from '@metamask/keyring-snap-client'; import type { HandleSnapRequest } from '@metamask/snaps-controllers'; import type { SnapId } from '@metamask/snaps-sdk'; import { HandlerType } from '@metamask/snaps-utils'; diff --git a/app/scripts/lib/snap-keyring/snap-keyring.test.ts b/app/scripts/lib/snap-keyring/snap-keyring.test.ts index 4136fd1fd1fc..0e778b2268d7 100644 --- a/app/scripts/lib/snap-keyring/snap-keyring.test.ts +++ b/app/scripts/lib/snap-keyring/snap-keyring.test.ts @@ -1,5 +1,6 @@ import { ControllerMessenger } from '@metamask/base-controller'; -import { EthAccountType, InternalAccount } from '@metamask/keyring-api'; +import { EthAccountType } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES } from '../../../../shared/constants/app'; import { MetaMetricsEventCategory, diff --git a/app/scripts/lib/transaction/util.test.ts b/app/scripts/lib/transaction/util.test.ts index 4d78ea51cfa5..0a941968d802 100644 --- a/app/scripts/lib/transaction/util.test.ts +++ b/app/scripts/lib/transaction/util.test.ts @@ -1,4 +1,4 @@ -import { InternalAccount } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { TransactionParams } from '@metamask/eth-json-rpc-middleware'; import { TransactionController, diff --git a/app/scripts/lib/transaction/util.ts b/app/scripts/lib/transaction/util.ts index 34f27d321e0b..a3d0b929aff8 100644 --- a/app/scripts/lib/transaction/util.ts +++ b/app/scripts/lib/transaction/util.ts @@ -1,4 +1,5 @@ -import { EthAccountType, InternalAccount } from '@metamask/keyring-api'; +import { EthAccountType } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { TransactionController, TransactionMeta, diff --git a/app/scripts/migrations/105.test.ts b/app/scripts/migrations/105.test.ts index 168fe8dd0916..b7d5ac0303e6 100644 --- a/app/scripts/migrations/105.test.ts +++ b/app/scripts/migrations/105.test.ts @@ -1,6 +1,6 @@ import { v4 as uuid } from 'uuid'; import { sha256FromString } from 'ethereumjs-util'; -import { InternalAccount } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { ETH_EOA_METHODS } from '../../../shared/constants/eth-methods'; import { migrate } from './105'; diff --git a/app/scripts/migrations/105.ts b/app/scripts/migrations/105.ts index a54b3e6457a7..5febcb0479f2 100644 --- a/app/scripts/migrations/105.ts +++ b/app/scripts/migrations/105.ts @@ -1,4 +1,5 @@ -import { EthAccountType, InternalAccount } from '@metamask/keyring-api'; +import { EthAccountType } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { sha256FromString } from 'ethereumjs-util'; import { v4 as uuid } from 'uuid'; import { cloneDeep } from 'lodash'; diff --git a/app/scripts/migrations/119.ts b/app/scripts/migrations/119.ts index 8cb0d2c04b97..606a9e38a31d 100644 --- a/app/scripts/migrations/119.ts +++ b/app/scripts/migrations/119.ts @@ -1,7 +1,7 @@ import { cloneDeep, isObject } from 'lodash'; import { hasProperty } from '@metamask/utils'; import { AccountsControllerState } from '@metamask/accounts-controller'; -import { InternalAccount } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; type VersionedData = { meta: { version: number }; diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 42c0b3ff7385..542d38004de3 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1051,6 +1051,7 @@ "packages": { "@ethereumjs/tx": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, + "@metamask/eth-snap-keyring>@metamask/keyring-internal-snap-client": true, "@metamask/eth-snap-keyring>@metamask/utils": true, "@metamask/eth-snap-keyring>uuid": true, "@metamask/keyring-api": true, @@ -1069,6 +1070,11 @@ "browserify>buffer": true } }, + "@metamask/eth-snap-keyring>@metamask/keyring-internal-snap-client": { + "packages": { + "@metamask/keyring-snap-client": true + } + }, "@metamask/eth-snap-keyring>@metamask/utils": { "globals": { "TextDecoder": true, @@ -1434,17 +1440,23 @@ } }, "@metamask/keyring-api": { + "packages": { + "@metamask/keyring-api>@metamask/keyring-utils": true, + "@metamask/keyring-api>@metamask/utils": true, + "@metamask/keyring-api>bech32": true, + "@metamask/utils>@metamask/superstruct": true + } + }, + "@metamask/keyring-api>@metamask/keyring-utils": { "globals": { "URL": true }, "packages": { - "@metamask/keyring-api>@metamask/utils": true, - "@metamask/keyring-api>bech32": true, - "@metamask/keyring-api>uuid": true, + "@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": true, "@metamask/utils>@metamask/superstruct": true } }, - "@metamask/keyring-api>@metamask/utils": { + "@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -1459,9 +1471,19 @@ "semver": true } }, - "@metamask/keyring-api>uuid": { + "@metamask/keyring-api>@metamask/utils": { "globals": { - "crypto": true + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@metamask/utils>@scure/base": true, + "@metamask/utils>pony-cause": true, + "@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true } }, "@metamask/keyring-controller": { @@ -1556,30 +1578,6 @@ "semver": true } }, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils": { - "globals": { - "URL": true - }, - "packages": { - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": true, - "@metamask/utils>@metamask/superstruct": true - } - }, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet": { "packages": { "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, @@ -1624,6 +1622,19 @@ "browserify>buffer": true } }, + "@metamask/keyring-snap-client": { + "packages": { + "@metamask/keyring-api": true, + "@metamask/keyring-api>@metamask/keyring-utils": true, + "@metamask/keyring-snap-client>uuid": true, + "@metamask/utils>@metamask/superstruct": true + } + }, + "@metamask/keyring-snap-client>uuid": { + "globals": { + "crypto": true + } + }, "@metamask/logging-controller": { "packages": { "@metamask/base-controller": true, @@ -2127,9 +2138,9 @@ }, "packages": { "@metamask/base-controller": true, + "@metamask/keyring-api": true, "@metamask/keyring-controller": true, "@metamask/network-controller": true, - "@metamask/profile-sync-controller>@metamask/keyring-api": true, "@metamask/profile-sync-controller>@noble/ciphers": true, "@metamask/profile-sync-controller>siwe": true, "@noble/hashes": true, @@ -2137,29 +2148,6 @@ "loglevel": true } }, - "@metamask/profile-sync-controller>@metamask/keyring-api": { - "packages": { - "@metamask/keyring-api>bech32": true, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils": true, - "@metamask/profile-sync-controller>@metamask/keyring-api>@metamask/utils": true, - "@metamask/utils>@metamask/superstruct": true - } - }, - "@metamask/profile-sync-controller>@metamask/keyring-api>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/profile-sync-controller>@noble/ciphers": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 42c0b3ff7385..542d38004de3 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1051,6 +1051,7 @@ "packages": { "@ethereumjs/tx": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, + "@metamask/eth-snap-keyring>@metamask/keyring-internal-snap-client": true, "@metamask/eth-snap-keyring>@metamask/utils": true, "@metamask/eth-snap-keyring>uuid": true, "@metamask/keyring-api": true, @@ -1069,6 +1070,11 @@ "browserify>buffer": true } }, + "@metamask/eth-snap-keyring>@metamask/keyring-internal-snap-client": { + "packages": { + "@metamask/keyring-snap-client": true + } + }, "@metamask/eth-snap-keyring>@metamask/utils": { "globals": { "TextDecoder": true, @@ -1434,17 +1440,23 @@ } }, "@metamask/keyring-api": { + "packages": { + "@metamask/keyring-api>@metamask/keyring-utils": true, + "@metamask/keyring-api>@metamask/utils": true, + "@metamask/keyring-api>bech32": true, + "@metamask/utils>@metamask/superstruct": true + } + }, + "@metamask/keyring-api>@metamask/keyring-utils": { "globals": { "URL": true }, "packages": { - "@metamask/keyring-api>@metamask/utils": true, - "@metamask/keyring-api>bech32": true, - "@metamask/keyring-api>uuid": true, + "@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": true, "@metamask/utils>@metamask/superstruct": true } }, - "@metamask/keyring-api>@metamask/utils": { + "@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -1459,9 +1471,19 @@ "semver": true } }, - "@metamask/keyring-api>uuid": { + "@metamask/keyring-api>@metamask/utils": { "globals": { - "crypto": true + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@metamask/utils>@scure/base": true, + "@metamask/utils>pony-cause": true, + "@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true } }, "@metamask/keyring-controller": { @@ -1556,30 +1578,6 @@ "semver": true } }, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils": { - "globals": { - "URL": true - }, - "packages": { - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": true, - "@metamask/utils>@metamask/superstruct": true - } - }, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet": { "packages": { "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, @@ -1624,6 +1622,19 @@ "browserify>buffer": true } }, + "@metamask/keyring-snap-client": { + "packages": { + "@metamask/keyring-api": true, + "@metamask/keyring-api>@metamask/keyring-utils": true, + "@metamask/keyring-snap-client>uuid": true, + "@metamask/utils>@metamask/superstruct": true + } + }, + "@metamask/keyring-snap-client>uuid": { + "globals": { + "crypto": true + } + }, "@metamask/logging-controller": { "packages": { "@metamask/base-controller": true, @@ -2127,9 +2138,9 @@ }, "packages": { "@metamask/base-controller": true, + "@metamask/keyring-api": true, "@metamask/keyring-controller": true, "@metamask/network-controller": true, - "@metamask/profile-sync-controller>@metamask/keyring-api": true, "@metamask/profile-sync-controller>@noble/ciphers": true, "@metamask/profile-sync-controller>siwe": true, "@noble/hashes": true, @@ -2137,29 +2148,6 @@ "loglevel": true } }, - "@metamask/profile-sync-controller>@metamask/keyring-api": { - "packages": { - "@metamask/keyring-api>bech32": true, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils": true, - "@metamask/profile-sync-controller>@metamask/keyring-api>@metamask/utils": true, - "@metamask/utils>@metamask/superstruct": true - } - }, - "@metamask/profile-sync-controller>@metamask/keyring-api>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/profile-sync-controller>@noble/ciphers": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 42c0b3ff7385..542d38004de3 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1051,6 +1051,7 @@ "packages": { "@ethereumjs/tx": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, + "@metamask/eth-snap-keyring>@metamask/keyring-internal-snap-client": true, "@metamask/eth-snap-keyring>@metamask/utils": true, "@metamask/eth-snap-keyring>uuid": true, "@metamask/keyring-api": true, @@ -1069,6 +1070,11 @@ "browserify>buffer": true } }, + "@metamask/eth-snap-keyring>@metamask/keyring-internal-snap-client": { + "packages": { + "@metamask/keyring-snap-client": true + } + }, "@metamask/eth-snap-keyring>@metamask/utils": { "globals": { "TextDecoder": true, @@ -1434,17 +1440,23 @@ } }, "@metamask/keyring-api": { + "packages": { + "@metamask/keyring-api>@metamask/keyring-utils": true, + "@metamask/keyring-api>@metamask/utils": true, + "@metamask/keyring-api>bech32": true, + "@metamask/utils>@metamask/superstruct": true + } + }, + "@metamask/keyring-api>@metamask/keyring-utils": { "globals": { "URL": true }, "packages": { - "@metamask/keyring-api>@metamask/utils": true, - "@metamask/keyring-api>bech32": true, - "@metamask/keyring-api>uuid": true, + "@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": true, "@metamask/utils>@metamask/superstruct": true } }, - "@metamask/keyring-api>@metamask/utils": { + "@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -1459,9 +1471,19 @@ "semver": true } }, - "@metamask/keyring-api>uuid": { + "@metamask/keyring-api>@metamask/utils": { "globals": { - "crypto": true + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@metamask/utils>@scure/base": true, + "@metamask/utils>pony-cause": true, + "@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true } }, "@metamask/keyring-controller": { @@ -1556,30 +1578,6 @@ "semver": true } }, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils": { - "globals": { - "URL": true - }, - "packages": { - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": true, - "@metamask/utils>@metamask/superstruct": true - } - }, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet": { "packages": { "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, @@ -1624,6 +1622,19 @@ "browserify>buffer": true } }, + "@metamask/keyring-snap-client": { + "packages": { + "@metamask/keyring-api": true, + "@metamask/keyring-api>@metamask/keyring-utils": true, + "@metamask/keyring-snap-client>uuid": true, + "@metamask/utils>@metamask/superstruct": true + } + }, + "@metamask/keyring-snap-client>uuid": { + "globals": { + "crypto": true + } + }, "@metamask/logging-controller": { "packages": { "@metamask/base-controller": true, @@ -2127,9 +2138,9 @@ }, "packages": { "@metamask/base-controller": true, + "@metamask/keyring-api": true, "@metamask/keyring-controller": true, "@metamask/network-controller": true, - "@metamask/profile-sync-controller>@metamask/keyring-api": true, "@metamask/profile-sync-controller>@noble/ciphers": true, "@metamask/profile-sync-controller>siwe": true, "@noble/hashes": true, @@ -2137,29 +2148,6 @@ "loglevel": true } }, - "@metamask/profile-sync-controller>@metamask/keyring-api": { - "packages": { - "@metamask/keyring-api>bech32": true, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils": true, - "@metamask/profile-sync-controller>@metamask/keyring-api>@metamask/utils": true, - "@metamask/utils>@metamask/superstruct": true - } - }, - "@metamask/profile-sync-controller>@metamask/keyring-api>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/profile-sync-controller>@noble/ciphers": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index cd8c3a1c7396..8c76cb6df139 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -1143,6 +1143,7 @@ "packages": { "@ethereumjs/tx": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util": true, + "@metamask/eth-snap-keyring>@metamask/keyring-internal-snap-client": true, "@metamask/eth-snap-keyring>@metamask/utils": true, "@metamask/eth-snap-keyring>uuid": true, "@metamask/keyring-api": true, @@ -1161,6 +1162,11 @@ "browserify>buffer": true } }, + "@metamask/eth-snap-keyring>@metamask/keyring-internal-snap-client": { + "packages": { + "@metamask/keyring-snap-client": true + } + }, "@metamask/eth-snap-keyring>@metamask/utils": { "globals": { "TextDecoder": true, @@ -1526,17 +1532,23 @@ } }, "@metamask/keyring-api": { + "packages": { + "@metamask/keyring-api>@metamask/keyring-utils": true, + "@metamask/keyring-api>@metamask/utils": true, + "@metamask/keyring-api>bech32": true, + "@metamask/utils>@metamask/superstruct": true + } + }, + "@metamask/keyring-api>@metamask/keyring-utils": { "globals": { "URL": true }, "packages": { - "@metamask/keyring-api>@metamask/utils": true, - "@metamask/keyring-api>bech32": true, - "@metamask/keyring-api>uuid": true, + "@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": true, "@metamask/utils>@metamask/superstruct": true } }, - "@metamask/keyring-api>@metamask/utils": { + "@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": { "globals": { "TextDecoder": true, "TextEncoder": true @@ -1551,9 +1563,19 @@ "semver": true } }, - "@metamask/keyring-api>uuid": { + "@metamask/keyring-api>@metamask/utils": { "globals": { - "crypto": true + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@metamask/utils>@scure/base": true, + "@metamask/utils>pony-cause": true, + "@noble/hashes": true, + "browserify>buffer": true, + "nock>debug": true, + "semver": true } }, "@metamask/keyring-controller": { @@ -1648,30 +1670,6 @@ "semver": true } }, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils": { - "globals": { - "URL": true - }, - "packages": { - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": true, - "@metamask/utils>@metamask/superstruct": true - } - }, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet": { "packages": { "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, @@ -1716,6 +1714,19 @@ "browserify>buffer": true } }, + "@metamask/keyring-snap-client": { + "packages": { + "@metamask/keyring-api": true, + "@metamask/keyring-api>@metamask/keyring-utils": true, + "@metamask/keyring-snap-client>uuid": true, + "@metamask/utils>@metamask/superstruct": true + } + }, + "@metamask/keyring-snap-client>uuid": { + "globals": { + "crypto": true + } + }, "@metamask/logging-controller": { "packages": { "@metamask/base-controller": true, @@ -2219,9 +2230,9 @@ }, "packages": { "@metamask/base-controller": true, + "@metamask/keyring-api": true, "@metamask/keyring-controller": true, "@metamask/network-controller": true, - "@metamask/profile-sync-controller>@metamask/keyring-api": true, "@metamask/profile-sync-controller>@noble/ciphers": true, "@metamask/profile-sync-controller>siwe": true, "@noble/hashes": true, @@ -2229,29 +2240,6 @@ "loglevel": true } }, - "@metamask/profile-sync-controller>@metamask/keyring-api": { - "packages": { - "@metamask/keyring-api>bech32": true, - "@metamask/keyring-controller>@metamask/keyring-api>@metamask/keyring-utils": true, - "@metamask/profile-sync-controller>@metamask/keyring-api>@metamask/utils": true, - "@metamask/utils>@metamask/superstruct": true - } - }, - "@metamask/profile-sync-controller>@metamask/keyring-api>@metamask/utils": { - "globals": { - "TextDecoder": true, - "TextEncoder": true - }, - "packages": { - "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils>@scure/base": true, - "@metamask/utils>pony-cause": true, - "@noble/hashes": true, - "browserify>buffer": true, - "nock>debug": true, - "semver": true - } - }, "@metamask/profile-sync-controller>@noble/ciphers": { "globals": { "TextDecoder": true, diff --git a/package.json b/package.json index cca9f509c9b5..0cc3222a7d1d 100644 --- a/package.json +++ b/package.json @@ -282,7 +282,7 @@ "@metamask-institutional/types": "^1.2.0", "@metamask/abi-utils": "^2.0.2", "@metamask/account-watcher": "^4.1.2", - "@metamask/accounts-controller": "^20.0.0", + "@metamask/accounts-controller": "^20.0.2", "@metamask/address-book-controller": "^6.0.0", "@metamask/announcement-controller": "^7.0.0", "@metamask/approval-controller": "^7.0.0", @@ -300,7 +300,7 @@ "@metamask/eth-ledger-bridge-keyring": "^5.0.1", "@metamask/eth-query": "^4.0.0", "@metamask/eth-sig-util": "^7.0.1", - "@metamask/eth-snap-keyring": "^5.0.1", + "@metamask/eth-snap-keyring": "^7.0.0", "@metamask/eth-token-tracker": "^9.0.0", "@metamask/eth-trezor-keyring": "^3.1.3", "@metamask/etherscan-link": "^3.0.0", @@ -311,8 +311,10 @@ "@metamask/jazzicon": "^2.0.0", "@metamask/json-rpc-engine": "^10.0.0", "@metamask/json-rpc-middleware-stream": "^8.0.4", - "@metamask/keyring-api": "^10.1.0", - "@metamask/keyring-controller": "^19.0.0", + "@metamask/keyring-api": "^12.0.0", + "@metamask/keyring-controller": "^19.0.2", + "@metamask/keyring-internal-api": "^1.0.0", + "@metamask/keyring-snap-client": "^1.0.0", "@metamask/logging-controller": "^6.0.0", "@metamask/logo": "^3.1.2", "@metamask/message-manager": "^11.0.0", diff --git a/shared/lib/multichain.ts b/shared/lib/multichain.ts index 26111a0970a2..49dc1add445b 100644 --- a/shared/lib/multichain.ts +++ b/shared/lib/multichain.ts @@ -6,7 +6,8 @@ import { } from '@metamask/utils'; import { validate, Network } from 'bitcoin-address-validation'; import { isAddress } from '@solana/addresses'; -import { InternalAccount, isEvmAccountType } from '@metamask/keyring-api'; +import { isEvmAccountType } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; /** * Returns whether an address is on the Bitcoin mainnet. diff --git a/test/data/mock-accounts.ts b/test/data/mock-accounts.ts index b956dbadd6bb..eab4cd4aa74d 100644 --- a/test/data/mock-accounts.ts +++ b/test/data/mock-accounts.ts @@ -1,6 +1,6 @@ import { KeyringTypes } from '@metamask/keyring-controller'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { - InternalAccount, EthAccountType, BtcMethod, BtcAccountType, diff --git a/test/jest/mocks.ts b/test/jest/mocks.ts index 8822b96315b6..9fdc6538d9d6 100644 --- a/test/jest/mocks.ts +++ b/test/jest/mocks.ts @@ -3,9 +3,9 @@ import { EthMethod, BtcMethod, BtcAccountType, - InternalAccount, isEvmAccountType, } from '@metamask/keyring-api'; +import { InternalAccount } from '@metamask/keyring-internal-api'; import { KeyringTypes } from '@metamask/keyring-controller'; import { v4 as uuidv4 } from 'uuid'; import { keyringTypeToName } from '@metamask/accounts-controller'; diff --git a/ui/components/app/confirm/info/row/__snapshots__/row.test.tsx.snap b/ui/components/app/confirm/info/row/__snapshots__/row.test.tsx.snap index a6a52806b2cf..5014d138a242 100644 --- a/ui/components/app/confirm/info/row/__snapshots__/row.test.tsx.snap +++ b/ui/components/app/confirm/info/row/__snapshots__/row.test.tsx.snap @@ -37,7 +37,7 @@ exports[`ConfirmInfoRow should match snapshot when copy is enabled 1`] = `