From 97ffbbcecb4ce4910e6e66380e79f38dd0582e3b Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Thu, 23 Jan 2025 18:24:27 +0100 Subject: [PATCH 1/3] feat(accounts-controller): re-publish Snap keyring events --- .../src/AccountsController.test.ts | 124 +++++++++++++++++- .../src/AccountsController.ts | 77 ++++++++++- 2 files changed, 198 insertions(+), 3 deletions(-) diff --git a/packages/accounts-controller/src/AccountsController.test.ts b/packages/accounts-controller/src/AccountsController.test.ts index 8c612d1e18..3eea7ba6a1 100644 --- a/packages/accounts-controller/src/AccountsController.test.ts +++ b/packages/accounts-controller/src/AccountsController.test.ts @@ -1,4 +1,10 @@ import { ControllerMessenger } from '@metamask/base-controller'; +import type { + AccountAssetListUpdatedEventPayload, + AccountBalancesUpdatedEventPayload, + AccountTransactionsUpdatedEventPayload, +} from '@metamask/keyring-api'; +import type { SnapKeyringAccountBalancesUpdatedEvent, SnapKeyringEvents } from '@metamask/eth-snap-keyring'; import { BtcAccountType, EthAccountType, @@ -134,7 +140,7 @@ const mockAccount4: InternalAccount = { }; class MockNormalAccountUUID { - #accountIds: Record = {}; + readonly #accountIds: Record = {}; constructor(accounts: InternalAccount[]) { for (const account of accounts) { @@ -299,6 +305,9 @@ function buildAccountsControllerMessenger(messenger = buildMessenger()) { allowedEvents: [ 'SnapController:stateChange', 'KeyringController:stateChange', + 'SnapKeyring:accountAssetListUpdated', + 'SnapKeyring:accountBalancesUpdated', + 'SnapKeyring:accountTransactionsUpdated', ], allowedActions: [ 'KeyringController:getAccounts', @@ -1393,6 +1402,119 @@ describe('AccountsController', () => { ); }); + describe('onSnapKeyringEvents', () => { + const setupTest = () => { + const account = createExpectedInternalAccount({ + id: 'mock-id', + name: 'Bitcoin Account', + address: 'tb1q4q7h8wuplrpmkxqvv6rrrq7qyhhjsj5uqcsxqu', + keyringType: KeyringTypes.snap, + snapId: 'mock-snap', + type: BtcAccountType.P2wpkh, + }); + + const messenger = buildMessenger(); + const { accountsController } = setupAccountsController({ + initialState: { + internalAccounts: { + accounts: { + [account.id]: account, + }, + selectedAccount: account.id, + }, + }, + messenger, + }); + + return { messenger, account, accountsController }; + }; + + it('re-publishes keyring events: SnapKeyring:accountBalancesUpdated', () => { + const { account, messenger } = setupTest(); + + const payload: AccountBalancesUpdatedEventPayload = { + balances: { + [account.id]: { + 'bip122:000000000019d6689c085ae165831e93/slip44:0': { + amount: '0.1', + unit: 'BTC', + }, + }, + }, + }; + + const mockRePublishedCallback = jest.fn(); + messenger.subscribe( + 'AccountsController:accountBalancesUpdated', + mockRePublishedCallback, + ); + messenger.publish('SnapKeyring:accountBalancesUpdated', payload); + expect(mockRePublishedCallback).toHaveBeenCalledWith(payload); + }); + + it('re-publishes keyring events: SnapKeyring:accountAssetListUpdated', () => { + const { account, messenger } = setupTest(); + + const payload: AccountAssetListUpdatedEventPayload = { + assets: { + [account.id]: { + added: ['bip122:000000000019d6689c085ae165831e93/slip44:0'], + removed: ['bip122:000000000933ea01ad0ee984209779ba/slip44:0'], + }, + }, + }; + + const mockRePublishedCallback = jest.fn(); + messenger.subscribe( + 'AccountsController:accountAssetListUpdated', + mockRePublishedCallback, + ); + messenger.publish('SnapKeyring:accountAssetListUpdated', payload); + expect(mockRePublishedCallback).toHaveBeenCalledWith(payload); + }); + + it('re-publishes keyring events: SnapKeyring:accountTransactionsUpdated', () => { + const { account, messenger } = setupTest(); + + const payload: AccountTransactionsUpdatedEventPayload = { + transactions: { + [account.id]: [ + { + id: 'f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6', + timestamp: null, + chain: 'bip122:000000000019d6689c085ae165831e93', + status: 'submitted', + type: 'receive', + account: account.id, + from: [], + to: [], + fees: [ + { + type: 'base', + asset: { + fungible: true, + type: 'bip122:000000000019d6689c085ae165831e93/slip44:0', + unit: 'BTC', + amount: '0.0001', + }, + }, + ], + events: [], + }, + ], + } + }; + + const mockRePublishedCallback = jest.fn(); + messenger.subscribe( + 'AccountsController:accountTransactionsUpdated', + mockRePublishedCallback, + ); + messenger.publish('SnapKeyring:accountTransactionsUpdated', payload); + expect(mockRePublishedCallback).toHaveBeenCalledWith(payload); + }); + }); + describe('updateAccounts', () => { const mockAddress1 = '0x123'; const mockAddress2 = '0x456'; diff --git a/packages/accounts-controller/src/AccountsController.ts b/packages/accounts-controller/src/AccountsController.ts index f2feed0e07..8bcc55889e 100644 --- a/packages/accounts-controller/src/AccountsController.ts +++ b/packages/accounts-controller/src/AccountsController.ts @@ -1,9 +1,15 @@ import type { ControllerGetStateAction, ControllerStateChangeEvent, + ExtractEventPayload, RestrictedControllerMessenger, } from '@metamask/base-controller'; import { BaseController } from '@metamask/base-controller'; +import type { + SnapKeyringAccountAssetListUpdatedEvent, + SnapKeyringAccountBalancesUpdatedEvent, + SnapKeyringAccountTransactionsUpdatedEvent, +} from '@metamask/eth-snap-keyring'; import { SnapKeyring } from '@metamask/eth-snap-keyring'; import { EthAccountType, @@ -161,7 +167,27 @@ export type AccountsControllerAccountRenamedEvent = { payload: [InternalAccount]; }; -export type AllowedEvents = SnapStateChange | KeyringControllerStateChangeEvent; +export type AccountsControllerAccountBalancesUpdatesEvent = { + type: `${typeof controllerName}:accountBalancesUpdated`; + payload: SnapKeyringAccountBalancesUpdatedEvent['payload']; +}; + +export type AccountsControllerAccountTransactionsUpdatedEvent = { + type: `${typeof controllerName}:accountTransactionsUpdated`; + payload: SnapKeyringAccountTransactionsUpdatedEvent['payload']; +}; + +export type AccountsControllerAccountAssetListUpdatedEvent = { + type: `${typeof controllerName}:accountAssetListUpdated`; + payload: SnapKeyringAccountAssetListUpdatedEvent['payload']; +}; + +export type AllowedEvents = + | SnapStateChange + | KeyringControllerStateChangeEvent + | SnapKeyringAccountAssetListUpdatedEvent + | SnapKeyringAccountBalancesUpdatedEvent + | SnapKeyringAccountTransactionsUpdatedEvent; export type AccountsControllerEvents = | AccountsControllerChangeEvent @@ -169,7 +195,10 @@ export type AccountsControllerEvents = | AccountsControllerSelectedEvmAccountChangeEvent | AccountsControllerAccountAddedEvent | AccountsControllerAccountRemovedEvent - | AccountsControllerAccountRenamedEvent; + | AccountsControllerAccountRenamedEvent + | AccountsControllerAccountBalancesUpdatesEvent + | AccountsControllerAccountTransactionsUpdatedEvent + | AccountsControllerAccountAssetListUpdatedEvent; export type AccountsControllerMessenger = RestrictedControllerMessenger< typeof controllerName, @@ -261,6 +290,33 @@ export class AccountsController extends BaseController< (keyringState) => this.#handleOnKeyringStateChange(keyringState), ); + this.messagingSystem.subscribe( + 'SnapKeyring:accountAssetListUpdated', + (snapAccountEvent) => + this.#handleOnSnapKeyringAccountEvent( + 'AccountsController:accountAssetListUpdated', + snapAccountEvent, + ), + ); + + this.messagingSystem.subscribe( + 'SnapKeyring:accountBalancesUpdated', + (snapAccountEvent) => + this.#handleOnSnapKeyringAccountEvent( + 'AccountsController:accountBalancesUpdated', + snapAccountEvent, + ), + ); + + this.messagingSystem.subscribe( + 'SnapKeyring:accountTransactionsUpdated', + (snapAccountEvent) => + this.#handleOnSnapKeyringAccountEvent( + 'AccountsController:accountTransactionsUpdated', + snapAccountEvent, + ), + ); + this.#registerMessageHandlers(); } @@ -677,6 +733,23 @@ export class AccountsController extends BaseController< return internalAccounts; } + /** + * Re-publish an account event. + * + * @param event - The event type. This is a unique identifier for this event. + * @param payload - The event payload. The type of the parameters for each event handler must + * match the type of this payload. + * @template EventType - A Snap keyring event type. + */ + #handleOnSnapKeyringAccountEvent< + EventType extends AccountsControllerEvents['type'], + >( + event: EventType, + ...payload: ExtractEventPayload + ): void { + this.messagingSystem.publish(event, ...payload); + } + /** * Handles changes in the keyring state, specifically when new accounts are added or removed. * From 3e3f6659c2ed9a1acc32a0d9a60a9b5ecf7872f5 Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Thu, 23 Jan 2025 21:25:49 +0100 Subject: [PATCH 2/3] chore: lint --- packages/accounts-controller/src/AccountsController.test.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/accounts-controller/src/AccountsController.test.ts b/packages/accounts-controller/src/AccountsController.test.ts index 3eea7ba6a1..008a18a983 100644 --- a/packages/accounts-controller/src/AccountsController.test.ts +++ b/packages/accounts-controller/src/AccountsController.test.ts @@ -4,7 +4,6 @@ import type { AccountBalancesUpdatedEventPayload, AccountTransactionsUpdatedEventPayload, } from '@metamask/keyring-api'; -import type { SnapKeyringAccountBalancesUpdatedEvent, SnapKeyringEvents } from '@metamask/eth-snap-keyring'; import { BtcAccountType, EthAccountType, @@ -1502,7 +1501,7 @@ describe('AccountsController', () => { events: [], }, ], - } + }, }; const mockRePublishedCallback = jest.fn(); From 37da01523ee116e15c1f8c56a39e2d6e66dfb34e Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Fri, 24 Jan 2025 22:30:47 +0100 Subject: [PATCH 3/3] chore: update accounts packages --- packages/accounts-controller/package.json | 6 +- packages/assets-controllers/package.json | 6 +- packages/keyring-controller/package.json | 4 +- .../package.json | 6 +- packages/profile-sync-controller/package.json | 4 +- yarn.lock | 113 ++++++++---------- 6 files changed, 65 insertions(+), 74 deletions(-) diff --git a/packages/accounts-controller/package.json b/packages/accounts-controller/package.json index cc60092e2e..52a6cf3a20 100644 --- a/packages/accounts-controller/package.json +++ b/packages/accounts-controller/package.json @@ -49,9 +49,9 @@ "dependencies": { "@ethereumjs/util": "^8.1.0", "@metamask/base-controller": "^7.1.1", - "@metamask/eth-snap-keyring": "^8.1.1", - "@metamask/keyring-api": "^14.0.0", - "@metamask/keyring-internal-api": "^2.0.1", + "@metamask/eth-snap-keyring": "^9.0.0", + "@metamask/keyring-api": "^15.0.0", + "@metamask/keyring-internal-api": "^3.0.0", "@metamask/snaps-sdk": "^6.7.0", "@metamask/snaps-utils": "^8.3.0", "@metamask/utils": "^11.0.1", diff --git a/packages/assets-controllers/package.json b/packages/assets-controllers/package.json index 0a70808053..8f9f9a3cd7 100644 --- a/packages/assets-controllers/package.json +++ b/packages/assets-controllers/package.json @@ -80,10 +80,10 @@ "@metamask/approval-controller": "^7.1.2", "@metamask/auto-changelog": "^3.4.4", "@metamask/ethjs-provider-http": "^0.3.0", - "@metamask/keyring-api": "^14.0.0", + "@metamask/keyring-api": "^15.0.0", "@metamask/keyring-controller": "^19.0.4", - "@metamask/keyring-internal-api": "^2.0.1", - "@metamask/keyring-snap-client": "^3.0.0", + "@metamask/keyring-internal-api": "^3.0.0", + "@metamask/keyring-snap-client": "^3.0.1", "@metamask/network-controller": "^22.1.1", "@metamask/preferences-controller": "^15.0.1", "@metamask/providers": "^18.1.1", diff --git a/packages/keyring-controller/package.json b/packages/keyring-controller/package.json index c3c0cb9c55..042ca79572 100644 --- a/packages/keyring-controller/package.json +++ b/packages/keyring-controller/package.json @@ -54,8 +54,8 @@ "@metamask/eth-hd-keyring": "^7.0.4", "@metamask/eth-sig-util": "^8.0.0", "@metamask/eth-simple-keyring": "^6.0.5", - "@metamask/keyring-api": "^14.0.0", - "@metamask/keyring-internal-api": "^2.0.1", + "@metamask/keyring-api": "^15.0.0", + "@metamask/keyring-internal-api": "^3.0.0", "@metamask/message-manager": "^12.0.0", "@metamask/utils": "^11.0.1", "async-mutex": "^0.5.0", diff --git a/packages/multichain-transactions-controller/package.json b/packages/multichain-transactions-controller/package.json index 3151da93d0..92ee129f68 100644 --- a/packages/multichain-transactions-controller/package.json +++ b/packages/multichain-transactions-controller/package.json @@ -48,9 +48,9 @@ }, "dependencies": { "@metamask/base-controller": "^7.1.1", - "@metamask/keyring-api": "^14.0.0", - "@metamask/keyring-internal-api": "^2.0.1", - "@metamask/keyring-snap-client": "^3.0.0", + "@metamask/keyring-api": "^15.0.0", + "@metamask/keyring-internal-api": "^3.0.0", + "@metamask/keyring-snap-client": "^3.0.1", "@metamask/polling-controller": "^12.0.2", "@metamask/snaps-controllers": "^9.10.0", "@metamask/snaps-sdk": "^6.7.0", diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index 792ff444c7..2dd6382a1b 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -101,7 +101,7 @@ }, "dependencies": { "@metamask/base-controller": "^7.1.1", - "@metamask/keyring-api": "^14.0.0", + "@metamask/keyring-api": "^15.0.0", "@metamask/keyring-controller": "^19.0.4", "@metamask/network-controller": "^22.1.1", "@metamask/snaps-sdk": "^6.7.0", @@ -117,7 +117,7 @@ "@lavamoat/preinstall-always-fail": "^2.1.0", "@metamask/accounts-controller": "^21.0.2", "@metamask/auto-changelog": "^3.4.4", - "@metamask/keyring-internal-api": "^2.0.1", + "@metamask/keyring-internal-api": "^3.0.0", "@metamask/providers": "^18.1.1", "@metamask/snaps-controllers": "^9.10.0", "@types/jest": "^27.4.1", diff --git a/yarn.lock b/yarn.lock index bf510aad60..1cf9667a7e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2304,10 +2304,10 @@ __metadata: "@ethereumjs/util": "npm:^8.1.0" "@metamask/auto-changelog": "npm:^3.4.4" "@metamask/base-controller": "npm:^7.1.1" - "@metamask/eth-snap-keyring": "npm:^8.1.1" - "@metamask/keyring-api": "npm:^14.0.0" + "@metamask/eth-snap-keyring": "npm:^9.0.0" + "@metamask/keyring-api": "npm:^15.0.0" "@metamask/keyring-controller": "npm:^19.0.4" - "@metamask/keyring-internal-api": "npm:^2.0.1" + "@metamask/keyring-internal-api": "npm:^3.0.0" "@metamask/providers": "npm:^18.1.1" "@metamask/snaps-controllers": "npm:^9.10.0" "@metamask/snaps-sdk": "npm:^6.7.0" @@ -2425,10 +2425,10 @@ __metadata: "@metamask/controller-utils": "npm:^11.4.5" "@metamask/eth-query": "npm:^4.0.0" "@metamask/ethjs-provider-http": "npm:^0.3.0" - "@metamask/keyring-api": "npm:^14.0.0" + "@metamask/keyring-api": "npm:^15.0.0" "@metamask/keyring-controller": "npm:^19.0.4" - "@metamask/keyring-internal-api": "npm:^2.0.1" - "@metamask/keyring-snap-client": "npm:^3.0.0" + "@metamask/keyring-internal-api": "npm:^3.0.0" + "@metamask/keyring-snap-client": "npm:^3.0.1" "@metamask/metamask-eth-abis": "npm:^3.1.1" "@metamask/network-controller": "npm:^22.1.1" "@metamask/polling-controller": "npm:^12.0.2" @@ -2919,28 +2919,24 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-snap-keyring@npm:^8.1.1": - version: 8.1.1 - resolution: "@metamask/eth-snap-keyring@npm:8.1.1" +"@metamask/eth-snap-keyring@npm:^9.0.0": + version: 9.0.0 + resolution: "@metamask/eth-snap-keyring@npm:9.0.0" dependencies: "@ethereumjs/tx": "npm:^4.2.0" + "@metamask/base-controller": "npm:^7.1.1" "@metamask/eth-sig-util": "npm:^8.1.2" - "@metamask/keyring-api": "npm:^14.0.0" - "@metamask/keyring-internal-api": "npm:^2.0.1" - "@metamask/keyring-internal-snap-client": "npm:^3.0.0" - "@metamask/keyring-utils": "npm:^1.2.0" - "@metamask/snaps-controllers": "npm:^9.10.0" - "@metamask/snaps-sdk": "npm:^6.7.0" - "@metamask/snaps-utils": "npm:^8.3.0" + "@metamask/keyring-api": "npm:^15.0.0" + "@metamask/keyring-internal-api": "npm:^3.0.0" + "@metamask/keyring-internal-snap-client": "npm:^3.0.1" + "@metamask/keyring-utils": "npm:^1.3.0" "@metamask/superstruct": "npm:^3.1.0" "@metamask/utils": "npm:^11.0.1" "@types/uuid": "npm:^9.0.8" uuid: "npm:^9.0.1" - webextension-polyfill: "npm:^0.12.0" peerDependencies: - "@metamask/keyring-api": ^14.0.0 - "@metamask/providers": ^18.3.1 - checksum: 10/43f373e67cf6989e1808514b7708288ed64bd79930fe511b7a4482f7464a8b418330d5f8ca8799afd098cefc41bbcf9b6eb00fe534f3b8101f352692c3ad3343 + "@metamask/keyring-api": ^15.0.0 + checksum: 10/9232a2188340fd20bdc76f041c86296ea8f15dfca473b631d1e82383bafa65371bf0893c85cb8c83120d97dfd73b007b8b63110db0d7dadf279056083fba6251 languageName: node linkType: hard @@ -3197,15 +3193,15 @@ __metadata: languageName: node linkType: hard -"@metamask/keyring-api@npm:^14.0.0": - version: 14.0.0 - resolution: "@metamask/keyring-api@npm:14.0.0" +"@metamask/keyring-api@npm:^15.0.0": + version: 15.0.0 + resolution: "@metamask/keyring-api@npm:15.0.0" dependencies: - "@metamask/keyring-utils": "npm:^1.2.0" + "@metamask/keyring-utils": "npm:^1.3.0" "@metamask/superstruct": "npm:^3.1.0" "@metamask/utils": "npm:^11.0.1" bech32: "npm:^2.0.0" - checksum: 10/6064fb584cdf02536f9aeec3789b8df53ec6b21f89c1e6aa301e614916b04fabc0f0ea7221440d8b7af6798c1354b89bb9022afc094a6cfd7c8b482d3ec5a3fe + checksum: 10/d05ed1171b718dd762b8cfc69ae77ea345bef45d94a728ab296d10d2c93afeb514c8534457f97bbb2ca2d3d28c65ade6c07e569ce89753b31e7d031996f9802e languageName: node linkType: hard @@ -3226,8 +3222,8 @@ __metadata: "@metamask/eth-hd-keyring": "npm:^7.0.4" "@metamask/eth-sig-util": "npm:^8.0.0" "@metamask/eth-simple-keyring": "npm:^6.0.5" - "@metamask/keyring-api": "npm:^14.0.0" - "@metamask/keyring-internal-api": "npm:^2.0.1" + "@metamask/keyring-api": "npm:^15.0.0" + "@metamask/keyring-internal-api": "npm:^3.0.0" "@metamask/message-manager": "npm:^12.0.0" "@metamask/scure-bip39": "npm:^2.1.1" "@metamask/utils": "npm:^11.0.1" @@ -3247,59 +3243,54 @@ __metadata: languageName: unknown linkType: soft -"@metamask/keyring-internal-api@npm:^2.0.1": - version: 2.0.1 - resolution: "@metamask/keyring-internal-api@npm:2.0.1" +"@metamask/keyring-internal-api@npm:^3.0.0": + version: 3.0.0 + resolution: "@metamask/keyring-internal-api@npm:3.0.0" dependencies: - "@metamask/keyring-api": "npm:^14.0.0" - "@metamask/keyring-utils": "npm:^1.2.0" + "@metamask/keyring-api": "npm:^15.0.0" + "@metamask/keyring-utils": "npm:^1.3.0" "@metamask/superstruct": "npm:^3.1.0" "@metamask/utils": "npm:^11.0.1" - checksum: 10/f508fda22085455360423fa6c1ad690c7d19a79b9e42d2b27fe4098a7b5db211b1c74f4df8606c34ead4c0f202d624ddcafc66f5d93b6af2f8aa59deb04e1332 + checksum: 10/9b98dfeec06157f014a5d0f8f7f09006140b47cc0c7ab09c7006eb937b51af2f47d1d44e4cda2984cf3922c93f49d5ee2a43629faeb8f98da8e582a8ced3d3f8 languageName: node linkType: hard -"@metamask/keyring-internal-snap-client@npm:^3.0.0": - version: 3.0.0 - resolution: "@metamask/keyring-internal-snap-client@npm:3.0.0" +"@metamask/keyring-internal-snap-client@npm:^3.0.1": + version: 3.0.1 + resolution: "@metamask/keyring-internal-snap-client@npm:3.0.1" dependencies: - "@metamask/keyring-api": "npm:^14.0.0" - "@metamask/keyring-snap-client": "npm:^3.0.0" - "@metamask/keyring-utils": "npm:^1.2.0" - "@metamask/snaps-controllers": "npm:^9.10.0" - "@metamask/snaps-sdk": "npm:^6.7.0" - "@metamask/snaps-utils": "npm:^8.3.0" - webextension-polyfill: "npm:^0.12.0" - peerDependencies: - "@metamask/providers": ^18.3.1 - checksum: 10/359597865c1501f1aacca406b38f1bddad1fc089d8a3ad9582939cd004ebbea713ffd2f2dd1568f424a5cc5bbf0f0166576e518f285d7a41df79c987e4969e82 + "@metamask/base-controller": "npm:^7.1.1" + "@metamask/keyring-api": "npm:^15.0.0" + "@metamask/keyring-snap-client": "npm:^3.0.1" + "@metamask/keyring-utils": "npm:^1.3.0" + checksum: 10/7548a48a60f70a5fc42bc3063db5819ae6e68896dcd73daafd99667964420ff8a483d09a3debb3386a622696fa77c5b141d5d1e80687142acee0448415b10b57 languageName: node linkType: hard -"@metamask/keyring-snap-client@npm:^3.0.0": - version: 3.0.0 - resolution: "@metamask/keyring-snap-client@npm:3.0.0" +"@metamask/keyring-snap-client@npm:^3.0.1": + version: 3.0.1 + resolution: "@metamask/keyring-snap-client@npm:3.0.1" dependencies: - "@metamask/keyring-api": "npm:^14.0.0" - "@metamask/keyring-utils": "npm:^1.2.0" + "@metamask/keyring-api": "npm:^15.0.0" + "@metamask/keyring-utils": "npm:^1.3.0" "@metamask/superstruct": "npm:^3.1.0" "@types/uuid": "npm:^9.0.8" uuid: "npm:^9.0.1" webextension-polyfill: "npm:^0.12.0" peerDependencies: "@metamask/providers": ^18.3.1 - checksum: 10/b7e90b0878210cfa7de2d0ab5cef82ee8007d1c71c1bc50436cd5f70aef633ae580e3ec818769cb38f7c6e8d7e4d610fad88c1e2ef63eaa32bc73dd15bf226fd + checksum: 10/6b3eaf3743c49a3b60af36a91a01037ee669da75c1baf2bbae63342004f5abed444f5300a318c31da896393ff27677f3527000102272e1b421c4ef068b91a3a9 languageName: node linkType: hard -"@metamask/keyring-utils@npm:^1.2.0": - version: 1.2.0 - resolution: "@metamask/keyring-utils@npm:1.2.0" +"@metamask/keyring-utils@npm:^1.3.0": + version: 1.3.0 + resolution: "@metamask/keyring-utils@npm:1.3.0" dependencies: "@metamask/superstruct": "npm:^3.1.0" "@metamask/utils": "npm:^11.0.1" bitcoin-address-validation: "npm:^2.2.3" - checksum: 10/685e70290717ec178c8c1caa4c2c7c21b8542a3665fd72e208722863063a07ba0d7d7293474c034733bf74572cb9e29fb9a2ab420ec64cd95aa6c2a78d2bb0d4 + checksum: 10/b2789e9870e5c83653de7631b641fef1f7718d5cedb16e88ea04ab77cca29d077325be2d67b53b01e3eaddcb09c7d03ead15dd0f52dfef72cab6b19f27e76dc0 languageName: node linkType: hard @@ -3357,10 +3348,10 @@ __metadata: "@metamask/accounts-controller": "npm:^21.0.2" "@metamask/auto-changelog": "npm:^3.4.4" "@metamask/base-controller": "npm:^7.1.1" - "@metamask/keyring-api": "npm:^14.0.0" + "@metamask/keyring-api": "npm:^15.0.0" "@metamask/keyring-controller": "npm:^19.0.4" - "@metamask/keyring-internal-api": "npm:^2.0.1" - "@metamask/keyring-snap-client": "npm:^3.0.0" + "@metamask/keyring-internal-api": "npm:^3.0.0" + "@metamask/keyring-snap-client": "npm:^3.0.1" "@metamask/polling-controller": "npm:^12.0.2" "@metamask/snaps-controllers": "npm:^9.10.0" "@metamask/snaps-sdk": "npm:^6.7.0" @@ -3685,9 +3676,9 @@ __metadata: "@metamask/accounts-controller": "npm:^21.0.2" "@metamask/auto-changelog": "npm:^3.4.4" "@metamask/base-controller": "npm:^7.1.1" - "@metamask/keyring-api": "npm:^14.0.0" + "@metamask/keyring-api": "npm:^15.0.0" "@metamask/keyring-controller": "npm:^19.0.4" - "@metamask/keyring-internal-api": "npm:^2.0.1" + "@metamask/keyring-internal-api": "npm:^3.0.0" "@metamask/network-controller": "npm:^22.1.1" "@metamask/providers": "npm:^18.1.1" "@metamask/snaps-controllers": "npm:^9.10.0"