All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- BREAKING: Bump peer dependency
@metamask/keyring-controllerfrom^22.0.0to^23.0.0(#6345) - Bump
@metamask/base-controllerfrom^8.0.1to^8.1.0(#6284) - Bump accounts related packages (#6309)
- Bump
@metamask/keyring-apifrom^20.0.0to^20.1.0 - Bump
@metamask/keyring-internal-apifrom^8.0.0to^8.1.0 - Bump
@metamask/eth-snap-keyringfrom^16.0.0to^16.1.0
- Bump
- Bump
@metamask/keyring-apifrom^19.0.0to^20.0.0(#6248) - Bump
@metamask/keyring-internal-apifrom^7.0.0to^8.0.0(#6248) - Bump
@metamask/eth-snap-keyringfrom^14.0.0to^16.0.0(#6248)
- Stop updating
selectedAccountunnecesarily (#6218)
- Allow extra
optionsproperties when detecting BIP-44 Snap account (#6189)
- BREAKING: Bump peer dependency
@metamask/snaps-controllersfrom^12.0.0to^14.0.0(#6035) - Bump
@metamask/snaps-sdkfrom^7.1.0to^9.0.0(#6035) - Bump
@metamask/snaps-utilsfrom^9.4.0to^11.0.0(#6035) - Bump
@metamask/keyring-apifrom^18.0.0to^19.0.0(#6146) - Bump
@metamask/keyring-internal-apifrom^6.2.0to^7.0.0(#6146) - Bump
@metamask/keyring-utilsfrom^3.0.0to^3.1.0(#6146) - Bump
@metamask/eth-snap-keyringfrom^13.0.0to^14.0.0(#6146) - Bump
@metamask/utilsfrom^11.2.0to^11.4.2(#6054)
- BREAKING: Bump peer dependency
@metamask/network-controllerto^24.0.0(#5999)
- BREAKING: Bump
@metamask/providerspeer dependency from^21.0.0to^22.0.0(#5871) - BREAKING: Bump
@metamask/snaps-controllerspeer dependency from^11.0.0to^12.0.0(#5871)
- Prevent use of
undefinedSnap duringSnapController:stateChange(#5884)- We were assuming that the Snap will always be defined, but this might not always be true.
- Populate
.options.entropySourcefor newInternalAccounts before publishing:accountAdded(#5841)
- BREAKING: bump
@metamask/keyring-controllerpeer dependency to^22.0.0(#5802)
- Add new
setAccountNameAndSelectAccountaction (#5714) - Add
entropySourceandderivationPathto EVM HD account options (#5618)
- BREAKING: Bump
@metamask/snaps-controllerspeer dependency from^9.19.0to^11.0.0(#5639) - BREAKING: Bump
@metamask/providerspeer dependency from^18.1.0to^21.0.0(#5639) - Bump
@metamask/base-controllerfrom^8.0.0to^8.0.1(#5722) - Bump
@metamask/snaps-sdkfrom^6.17.1to^6.22.0(#5639) - Bump
@metamask/snaps-utilsfrom^8.10.0to^9.2.0(#5639) - Bump
@metamask/eth-snap-keyringfrom^12.0.0to^12.1.1(#5565) - Bump
@metamask/keyring-apifrom^17.2.0to^17.4.0(#5565) - Bump
@metamask/keyring-internal-apifrom^6.0.0to^6.0.1(#5565)
- Do not fire events during
updateblocks (#5555) - Prevent unnecessary state updates when updating
InternalAccount.metadata.snap(#5735)
- BREAKING: Bump peer dependency
@metamask/network-controllerto^23.0.0(#5507)
@metamask/network-controllerpeer dependency is no longer also a direct dependency (#5464))
- Simplify account iteration logic (#5445)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^21.0.0(#5439) - BREAKING: Bump
@metamask/keyring-utilsfrom^2.3.1to^3.0.0(#5347) - BREAKING: Bump
@metamask/keyring-internal-apifrom^5.0.0to^6.0.0(#5347) - BREAKING: Bump
@metamask/eth-snap-keyringfrom^11.1.0to^12.0.0(#5347) - BREAKING: Bump
@ethereumjs/utilfrom^8.1.0to^9.1.0(#5347)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^20.0.0(#5426) - Bump
@metamask/keyring-internal-apifrom^4.0.3to^5.0.0(#5405)
- Use
account.scopesinlistMultichainAccounts(#5388)- The previous logic was fragile and was relying on the account's type mainly.
- Bump
@metamask/keyring-controller"from^19.1.0to^19.2.0(#5357) - Bump
@metamask/keyring-api"from^17.0.0to^17.2.0(#5366) - Bump
@metamask/keyring-internal-apifrom^4.0.1to^4.0.3(#5356), (#5366) - Bump
@metamask/eth-snap-keyringfrom^10.0.0to^11.1.0(#5366) - Bump
@metamask/utilsfrom^11.1.0to^11.2.0(#5301)
- BREAKING: Now requires
MultichainNetworkController:didNetworkChangeevent to be registered on the messenger (#5215)- This will be used to keep accounts in sync with EVM and non-EVM network changes.
- Add new keyring type for OneKey (#5216)
- Bump
@metamask/base-controllerfrom^7.1.1to^8.0.0(#5305)
- BREAKING: Bump
@metamask/snaps-controllerspeer dependency from^9.7.0to^9.19.0(#5265) - Bump
@metamask/keyring-api"from^16.1.0to^17.0.0(#5280) - Bump
@metamask/eth-snap-keyringfrom^9.1.1to^10.0.0(#5280) - Bump
@metamask/snaps-sdkfrom^6.7.0to^6.17.1(#5220), (#5265) - Bump
@metamask/snaps-utilsfrom^8.9.0to^8.10.0(#5265) - Bump
@metamask/utilsfrom^11.0.1to^11.1.0(#5223)
- Properly exports public members (#5224)
- The new events (
AccountsController:account{AssetList,Balances,Transactions}Updated) from the previous versions but were not exported.
- The new events (
- Add
AccountsController:account{AssetList,Balances,Transactions}Updatedevents (#5190)- Those events are being sent from Account Snaps (through the Snap keyring) and are being re-published by the
AccountController.
- Those events are being sent from Account Snaps (through the Snap keyring) and are being re-published by the
- BREAKING: Now requires
SnapKeyring:account{AssetList,Balances,Transactions}Updatedevents to be registered on the messenger (#5190) - Bump
@metamask/keyring-apifrom^14.0.0to^16.1.0(#5190), (#5208) - Bump
@metamask/keyring-internal-apifrom^2.0.1to^4.0.1(#5190), (#5208) - Bump
@metamask/eth-snap-keyringfrom^8.1.1to^9.1.1(#5190), (#5208)
- Bump
@metamask/keyring-apifrom^13.0.0to^14.0.0(#5177) - Bump
@metamask/keyring-internal-apifrom^2.0.0to^2.0.1(#5177) - Bump
@metamask/eth-snap-keyringfrom^8.1.0to^8.1.1(#5177)
- Bump
@metamask/eth-snap-keyringfrom^8.0.0to^8.1.0(#5167)
- BREAKING: Add
scopesfield toKeyringAccount(#5066), (#5136)- This field is now required and will be used to identify the supported chains (using CAIP-2 chain IDs) for every accounts.
- Bump
@metamask/base-controllerfrom^7.0.0to^7.1.1(#5079), (#5135) - Bump
@metamask/utilsto^11.0.1(#5080) - Bump
@metamask/rpc-errorsto^7.0.2(#5080)
- Use new
@metamask/keyring-internal-api@^1.0.0(#4695)- This package has been split out from the Keyring API.
- Bump
@metamask/keyring-apifrom^10.1.0to^12.0.0(#4695) - Bump
@metamask/eth-snap-keyringfrom^5.0.1to^7.0.0(#4695)- ESM/CommonJS support.
- Make implicit peer dependencies explicit (#4974)
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
@metamask/providers^18.1.0(required by@metamask/keyring-api)webextension-polyfill^0.10.0 || ^0.11.0 || ^0.12.0(required by@metamask/providers)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- Correct ESM-compatible build so that imports of the following packages that re-export other modules via
export *are no longer corrupted: (#5011)@metamask/keyring-api@metamask/eth-snap-keyring
- BREAKING: Bump peer dependency
@metamask/keyring-controllerfrom^18.0.0to^19.0.0(#4915) - BREAKING: Bump
@metamask/keyring-apifrom^8.1.3to^10.1.0(#4948)- If you are depending on
@metamask/providersdirectly, you will need to upgrade to18.1.0.
- If you are depending on
- Bump
@metamask/eth-snap-keyringfrom^4.3.6to^5.0.1(#4948) - Bump
@metamask/snaps-utilsfrom^4.3.6to^8.3.0(#4948) - Bump
@metamask/snaps-sdkfrom^6.5.0to^6.7.0(#4948)
- BREAKING: Bump peer dependency
@metamask/keyring-controllerfrom^17.0.0to^18.0.0(#4915)
- Bump
@metamask/base-controllerfrom^7.0.1to^7.0.2(#4862) - Bump
@metamask/utilsfrom^9.1.0to^10.0.0(#4831) - Bump dev dependency
@metamask/keyring-controllerfrom^17.2.2to^17.3.1(#4810, #4870)
- Bump accounts related packages (#4713), (#4728)
- Those packages are now built slightly differently and are part of the accounts monorepo.
- Bump
@metamask/keyring-apifrom^8.1.0to^8.1.4 - Bump
@metamask/eth-snap-keyringfrom^4.3.3to^4.3.6
- Bump
@metamask/eth-snap-keyringfrom^4.3.1to^4.3.3(#4689) - Bump
@metamask/snaps-sdkfrom^6.1.1to^6.5.0(#4689) - Bump
@metamask/snaps-utilsfrom^7.8.1to^8.1.1(#4689) - Bump peer dependency
@metamask/snaps-controllersfrom^9.3.0to^9.7.0(#4689)
- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#4648)
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
exportsfield inpackage.jsonlinked to these files. This is an anti-pattern and was rightfully flagged by the "Are the Types Wrong?" tool as "masquerading as CJS". All of the ATTW checks now pass.
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
- Remove chunk files (#4648).
- Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present.
- Add event
AccountsController:accountRenamedand export corresponding event typeAccountsControllerAccountRenamedEvent(#4664), (#4660) - Add new
nameLastUpdatedAttimestamp to account's metadata (#4589)
- Consolidate
setAccountNamelogic inupdateAccountMetadata(#4663)- Moved the logic for checking account name uniqueness and triggering the
accountRenamedevent fromsetAccountNametoupdateAccountMetadata. ThesetAccountNamemethod now callsupdateAccountMetadatato handle these tasks.
- Moved the logic for checking account name uniqueness and triggering the
- Bump
@metamask/base-controllerfrom^6.0.3to^7.0.0(#4643)
- Export
AccountsControllerUpdateAccountMetadataActionaction (#4590) - Add new method
updateAccountMetadata(#4568)
- Bump
@metamask/keyring-apito version8.1.0(#4594)
- Handle undefined
selectedAccountinupdateAccounts(#4623) - Fix
AccountsControllerUpdateAccountMetadataActionaction type name (#4590)
- BREAKING: Bump peerDependency
@metamask/snaps-controllersfrom^8.1.1to^9.3.0(#3645) - Remove
@metamask/keyring-controllerdependency #4556- This was listed under
peerDependenciesalready, so it was redundant as a dependency.
- This was listed under
- Upgrade TypeScript version to
~5.0.4and setmoduleResolutionoption toNode16(#3645) - Bump
@metamask/base-controllerfrom^6.0.0to^6.0.2(#4517, #4544) - Bump
@metamask/keyring-apifrom^8.0.0to^8.0.1(#3645) - Bump
@metamask/snaps-sdkfrom^4.2.0to^6.1.1(#3645, #4547) - Bump
@metamask/snaps-utilsfrom^7.4.0to^7.8.1(#3645, #4547) - Bump
@metamask/utilsfrom^8.3.0to^9.1.0(#4516, #4529)
- Add internal actions and events to
AccountsController(#4496, #4497)- Add events
AccountsController:accountAdded,AccountsController:accountRemoved, and export corresponding event typesAccountsControllerAccountAddedEvent,AccountsControllerAccountRemovedEvent. - Export action types
AccountsControllerListMultichainAccountsAction,AccountsControllerGetSelectedMultichainAccountAction,AccountsControllerGetNextAvailableAccountNameAction.
- Add events
- Improve support of non-EVM accounts (#4494)
- We now use
listMultichainAccountsinstead oflistAccountsfor non-EVM specific multichain methods
- We now use
- Emit
selectedAccountChangeand updatelastSelectedfor initial account (#4494)
- Handle edge case of undefined
selectedAccountduring onboarding forgetSelectedMultichainAccount(#4466)
- Add
AccountsController:listMultichainAccountsaction (#4426)
- Refactored
getSelectedAccountto handle case when there are no accounts to return. The logic was previously contained ingetAccountExpecthas been transferred togetSelectedAccount. (#4322) - Updated
handleAccountRemovedto automatically select the most recent account if the removed account was the currently selected account. (#4322) - Move
@metamask/keyring-controllerto dependency (#4425)
- BREAKING: Newly added account is no longer set as the last selected account (#4363)
- Bump
@metamask/eth-snap-keyringto^4.3.1(#4405) - Bump
@metamask/keyring-apito^8.0.0(#4405) - Bump
@metamask/keyring-controllerto^17.1.0(devDependencies) (#4413)
- Use
listMultichainAccountingetAccountByAddress(#4375)
- BREAKING: Bump minimum Node version to 18.18 (#3611)
- BREAKING: Bump peer dependency
@metamask/keyring-controllerto^17.0.0(#4352) - Bump
@metamask/base-controllerto^6.0.0(#4352)
- Add
getNextAvailableAccountNamemethod andAccountsController:getNextAvailableAccountNamecontroller action (#4326) - Add
listMultichainAccountsmethod for getting accounts on a specific chain or the default chain (#4330) - Add
getSelectedMultichainAccountmethod andAccountsController:getSelectedMultichainAccountcontroller action for getting the selected account on a specific chain or the default chain (#4330)
- BREAKING: Bump peer dependency
@metamask/snaps-controllersto^8.1.1(#4262) - BREAKING: Bump peer dependency
@metamask/keyring-controllerto^16.1.0(#4342) - BREAKING:
listAccountsnow filters the list of accounts in state to EVM accounts (#4330) - BREAKING:
getSelectedAccountnow throws if the selected account is not an EVM account (#4330) - Bump
@metamask/eth-snap-keyringto^4.1.1(#4262) - Bump
@metamask/keyring-apito^6.1.1(#4262) - Bump
@metamask/snaps-sdkto^4.2.0(#4262) - Bump
@metamask/snaps-utilsto^7.4.0(#4262)
- Fix "Type instantiation is excessively deep and possibly infinite" TypeScript error (#4331)
- BREAKING Bump
@metamask/keyring-controllerpeer dependency to ^16.0.0 (#4234) - Bump
@metamask/keyring-apito 6.0.0,@metamask/eth-snap-keyringto 4.0.0 and snap dependencies (#4193) - Bump
@metamask/base-controllerto^5.0.2(#4232)
- Fix update setSelectedAccount to throw if the id is not found (#4167)
- Fix normal account indexing naming with index gap (#4089)
- BREAKING Bump peer dependency
@metamask/snaps-controllersto^6.0.3and dependencies@metamask/snaps-sdkto^3.1.1,@metamask/eth-snap-keyringto^3.0.0(#4090)
- Fix
typesfield inpackage.json(#4047)
- BREAKING: Add ESM build (#3998)
- It's no longer possible to import files from
./distdirectly.
- It's no longer possible to import files from
- BREAKING: Bump
@metamask/base-controllerto^5.0.0(#4039)- This version has a number of breaking changes. See the changelog for more.
- BREAKING: Bump peer dependency on
@metamask/keyring-controllerto^14.0.0(#4039)
- BREAKING: Remove action and event types unrelated to
AccountsControllerfromAccountsControllerActionsandAccountsControllerEvents(#4031)
- BREAKING: Narrow allowed actions and event type for
AccountsControllermessenger (#4021, #4031)- Narrow type parameter
AllowedActionfromstringto(KeyringControllerGetKeyringForAccountAction | KeyringControllerGetKeyringsByTypeAction | KeyringControllerGetAccountsAction)['type']. - Narrow type parameter
AllowedEventfromstringto(SnapStateChange | KeyringControllerStateChangeEvent)['type'], removing other events fromSnapControllerandKeyringController.
- Narrow type parameter
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^13.0.0(#4007) - Replace
ethereumjs-utilwith@ethereumjs/utilandethereum-cryptography(#3943)
- Update
keyringTypeToNameto return the correct name for custody keyrings (#3899)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^12.2.0(#3821) - Bump
@metamask/base-controllerto^4.1.1(#3821)
- Add methods to support ERC-4337 accounts (#3602)
- Add getAccount action to AccountsController (#1892)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to ^12.1.0 (#3747, #3810) - BREAKING: Bump
@metamask/snaps-controllerspeer dependency to ^4.0.0 (#3747) - Bump
@metamask/keyring-apito ^3.0.0 (#3747) - Bump
@metamask/utilsto^8.3.0(#3769)
- Fix quick succession of submit password causing Accounts Controller state to be cleared (#3802)
- BREAKING: Bump
@metamask/keyring-controllerto ^12.0.0
- Bump snaps dependencies (#3734)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency from^10.0.0to^11.0.0(#3695) - BREAKING: Add
@metamask/snaps-controllersas a peer dependency (#3607) - Bump
@metamask/base-controllerto^4.0.1(#3695)
- BREAKING: Bump
@metamask/base-controllerto ^4.0.0 (#2063)- This is breaking because the type of the
messengerhas backward-incompatible changes. See the changelog for this package for more.
- This is breaking because the type of the
- Bump
@metamask/keyring-controllerto ^10.0.0 (#2063)
- BREAKING: Bump dependency and peer dependency on
@metamask/keyring-controllerto ^9.0.0 - Bump
@metamask/snaps-utilsand@metamask/snaps-controllerto 3.2.0 (#1917, #1944, #1977) - Bump @metamask/utils from 8.1.0 to 8.2.0 (#1957)
- Bump @metamask/keyring-api from 1.0.0 to 1.1.0 (#1951)
- BREAKING Update the
onKeyringStateChangeandonSnapStateChangemethods, and remove thekeyringApiEnabledfrom the AccountsController (#1839) - Add getSelectedAccount and getAccountByAddress actions to AccountsController (#1858)
- BREAKING: Bump dependency on
@metamask/eth-snap-keyringto ^1.0.0 (#1735) - BREAKING: Bump dependency on
@metamask/keyring-apito ^1.0.0 (#1735) - BREAKING: Bump dependency on
@metamask/snaps-utilsto ^3.0.0 (#1735) - Bump dependency and peer dependency on
@metamask/keyring-controllerto ^8.0.3
- Bump dependency on
@metamask/utilsto ^8.1.0 (#1639) - Bump dependency on
@metamask/base-controllerto ^3.2.3 - Bump peer dependency on
@metamask/keyring-controllerto ^8.0.2
- Update TypeScript to v4.8.x (#1718)
- Remove unused
selectedAccountfrom state metadata (#1734)
- BREAKING: Bump peer dependency on
@metamask/keyring-controllerto ^8.0.0
- Initial release (#1637)