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.
- Bump
@metamask/utilsfrom^11.9.0to^11.11.0(#9074) - Bump
@metamask/profile-sync-controllerfrom^28.1.1to^28.2.0(#9119) - Bump
@metamask/keyring-controllerfrom^27.0.0to^27.1.0(#9129)
- Bump
@metamask/accounts-controllerfrom^39.0.0to^39.0.1(#9058) - Bump
@metamask/keyring-controllerfrom^26.0.0to^27.0.0(#9058) - Bump
@metamask/multichain-account-servicefrom^10.0.2to^10.0.3(#9058)
- Bump
@metamask/accounts-controllerfrom^38.1.2to^39.0.0(#8999) - Bump
@metamask/multichain-account-servicefrom^10.0.1to^10.0.2(#8999)
- Add group naming support for
KeyringType(v2) (#8885) - Add
KeyringType(v2) in Snap matching rule (#8885)
- Bump
@metamask/keyring-controllerfrom^25.5.0to^26.0.0(#8912) - Bump
@metamask/accounts-controllerfrom^38.1.1to^38.1.2(#8912) - Bump
@metamask/multichain-account-servicefrom^10.0.0to^10.0.1(#8912) - Bump
@metamask/profile-sync-controllerfrom^28.1.0to^28.1.1(#8912)
- Add
AccountTreeController:accountGroup{Created,Updated,Removed}events (#8766)- None of these events fire during
init/reinit, consumers should bootstrap from:getStateor:accountTreeChange.
- None of these events fire during
- Bump
@metamask/accounts-controllerfrom^38.0.0to^38.1.1(#8755, #8774) - Bump
@metamask/multichain-account-servicefrom^9.0.0to^10.0.0(#8783) - Bump
@metamask/profile-sync-controllerfrom^28.0.2to^28.1.0(#8783)
- Expose missing public
AccountTreeControllermethods through its messenger (#8716)- The following actions are now available:
AccountTreeController:initAccountTreeController:reinit
- Corresponding action types are available as well.
- The following actions are now available:
- Bump
@metamask/keyring-controllerfrom^25.4.0to^25.5.0(#8722) - Bump
@metamask/multichain-account-servicefrom^8.0.1to^9.0.0(#8722)
- Bump
@metamask/accounts-controllerfrom^37.2.0to^38.0.0(#8665) - Bump
@metamask/keyring-apifrom^21.6.0to^23.1.0(#8464, #8647) - Add Stellar sort-order support (#8464)
- Now use
SnapController:getSnapwhen applying Snap rule (instead of usingaccount.metadata.snap.enabled. (#8584)- As a result of this, Snap accounts that reference unavailable Snap (read, not available on the
SnapController) will now be grouped under the Keyring rule instead (e.g being put in the "Snap Wallet" section).
- As a result of this, Snap accounts that reference unavailable Snap (read, not available on the
- Bump
@metamask/messengerfrom^1.1.1to^1.2.0(#8632) - Bump
@metamask/keyring-controllerfrom^25.2.0to^25.4.0(#8634, #8665)
- Always fire
:selectedAccountGroupChangeduringinitcall (#8427)- Many controllers were actually relying on this behavior when this used to be dynamic, so we re-introduce this behavior.
- Now persist
accounTree(#8437)- The tree is not persisted and can be used before
initis called. - This allow consumers (like the assets controllers) to rely on the selected group's accounts right away.
- The tree is not persisted and can be used before
- Bump
@metamask/accounts-controllerfrom^37.1.1to^37.2.0(#8363) - Bump
@metamask/keyring-controllerfrom^25.1.1to^25.2.0(#8363) - Bump
@metamask/messengerfrom^1.0.0to^1.1.1(#8364, #8373) - Bump
@metamask/base-controllerfrom^9.0.1to^9.1.0(#8457)
- Remove dynamic identifiers (wallet IDs, group IDs) from backup and sync thrown error messages to improve Sentry error grouping (#8349)
- BREAKING: Bump
@metamask/snaps-controllersfrom^17.2.0to^19.0.0(#8319)- The controller now requires
SnapController:getSnapinstead ofSnapController:get.
- The controller now requires
- Bump
@metamask/snaps-sdkfrom^10.3.0to^11.0.0(#8319) - Bump
@metamask/snaps-utilsfrom^11.7.0to^12.1.2(#8319) - Bump
@metamask/accounts-controllerfrom^37.1.0to^37.1.1(#8325) - Bump
@metamask/multichain-account-servicefrom^8.0.0to^8.0.1(#8325) - Bump
@metamask/profile-sync-controllerfrom^28.0.1to^28.0.2(#8325)
- Add
lastSelected(timestamp) to account group tree node metadata (#8261, #8300)group.metadata.lastSelectedis set toDate.now()whenever a group becomes the selected group, either viasetSelectedAccountGrouporAccountsController:selectedAccountChange.- The value is persisted in
accountGroupsMetadataand restored oninit/reinit. - The value is not synchronize through backup and sync.
- Now consider
lastSelectedtoo when the controller needs to use the "default account group ID".
- BREAKING: Move
selectedAccountGroupto top-level persisted state to prevent selected account group from reverting after app restart (#8245) - BREAKING: Use
:accounts{Added,Removed}batched events to reduce number of state updates (#8160) - Bump
@metamask/keyring-apifrom^21.5.0to^21.6.0(#8259) - Bump
@metamask/accounts-controllerfrom^37.0.0to^37.1.0(#8317) - Bump
@metamask/base-controllerfrom^9.0.0to^9.0.1(#8317) - Bump
@metamask/keyring-controllerfrom^25.1.0to^25.1.1(#8317) - Bump
@metamask/messengerfrom^0.3.0to^1.0.0(#8317) - Bump
@metamask/multichain-account-servicefrom^7.1.0to^8.0.0(#8317) - Bump
@metamask/profile-sync-controllerfrom^28.0.0to^28.0.1(#8317) - Batch multichain account groups creation in backup and sync (#7907)
- This prevents multiple consecutive tree rebuilds, as well as keyring updates and thus improves performance during the initial backup and sync process.
- Filter out extra properties from groups before sending to user storage (#8300)
- The
lastSelectedmetadata should not be persisted, to we automatically remove it from the payload. - This uses the user storage schema to only keep what needs to be persisted.
- The
- Fix
AccountTreeControllerMessengertype so that the union type for events is notany(#8240)
- Bump
@metamask/profile-sync-controllerfrom^27.1.0to^28.0.0(#8162)
- Expose missing public
AccountTreeControllermethods through its messenger (#7976)- The following actions are now available:
AccountTreeController:getAccountWalletObjectAccountTreeController:getAccountWalletObjectsAccountTreeController:getAccountGroupObjectAccountTreeController:clearStateAccountTreeController:syncWithUserStorageAccountTreeController:syncWithUserStorageAtLeastOnce
- Corresponding action types (e.g.
AccountTreeControllerGetAccountWalletObjectAction) are available as well.
- The following actions are now available:
- Bump
@metamask/accounts-controllerfrom^36.0.0to^37.0.0(#7996, #8140) - Bump
@metamask/multichain-account-servicefrom^7.0.0to^7.1.0(#8140)
- BREAKING: Remove
resolveNameConflictfromAccountTreeController(#7976)- This method was only used internally.
- Bump
@metamask/accounts-controllerfrom^35.0.2to^36.0.0(#7897) - Bump
@metamask/multichain-account-servicefrom^6.0.0to^7.0.0(#7897)
- Add
getAccountContextmethod andAccountTreeController:getAccountContextaction (#7741)- This can be used to map an account back to its position (wallet, group) in the account tree.
- Bump
@metamask/snaps-sdkfrom^9.0.0to^10.3.0(#7550) - Bump
@metamask/snaps-utilsfrom^11.0.0to^11.7.0(#7550) - Upgrade
@metamask/utilsfrom^11.8.1to^11.9.0(#7511) - Move peer dependencies for controller and service packages to direct dependencies (#7209, #7437, #7515, #7594, #7550, #7604, #7642, #7678, #7713, #7849, #7869)
- The dependencies moved are:
@metamask/accounts-controller(^35.0.2)@metamask/keyring-controller(^25.1.0)@metamask/multichain-account-service(^6.0.0)@metamask/profile-sync-controller(^27.1.0)@metamask/snaps-controllers(^17.2.0)
- In clients, it is now possible for multiple versions of these packages to exist in the dependency tree.
- For example, this scenario would be valid: a client relies on
@metamask/controller-a1.0.0 and@metamask/controller-b1.0.0, and@metamask/controller-bdepends on@metamask/controller-a1.1.0.
- For example, this scenario would be valid: a client relies on
- Note, however, that the versions specified in the client's
package.jsonalways "win", and you are expected to keep them up to date so as not to break controller and service intercommunication.
- The dependencies moved are:
- BREAKING: Bump
@metamask/profile-sync-controllerfrom^26.0.0to^27.0.0(#7202) - BREAKING: Bump
@metamask/multichain-account-servicefrom^3.0.0to^4.0.0(#7202) - BREAKING: Bump
@metamask/keyring-controllerfrom^24.0.0to^25.0.0(#7202) - BREAKING: Bump
@metamask/accounts-controllerfrom^34.0.0to^35.0.0(#7202)
- BREAKING: Bump
@metamask/multichain-account-servicefrom^2.0.0to^3.0.0(#7100)
- BREAKING: Use new
Messengerfrom@metamask/messenger(#6380)- Previously,
AccountTreeControlleraccepted aRestrictedMessengerinstance from@metamask/base-controller.
- Previously,
- BREAKING: Bump
@metamask/accounts-controllerfrom^33.0.0to^34.0.0(#6962) - BREAKING: Bump
@metamask/keyring-controllerfrom^23.0.0to^24.0.0(#6962) - BREAKING: Bump
@metamask/multichain-account-servicefrom^1.0.0to^2.0.0(#6962) - BREAKING: Bump
@metamask/profile-sync-controllerfrom^25.0.0to^26.0.0(#6962) - Bump
@metamask/base-controllerfrom^8.4.2to^9.0.0(#6962)
- Add optional account hidden/pinned state callbacks (#6910)
- Those callbacks can be used migrate existing account state into the tree metadata.
- Bump
@metamask/base-controllerfrom^8.4.1to^8.4.2(#6917)
- Use non-EVM account names for group names (#6831)
- EVM accounts still take precedence over non-EVM accounts.
- Before accounts get re-aligned, it is possible that a group contains only non-EVM accounts, in which case, the first non-EVM account name will be used for that account group.
- Fix wallet metadata cleanup when wallets are completely removed (#6813)
- Ensure
isLegacyAccountSyncingDisabledis always set inUserStorageSyncedWalletafter one successful full sync (#6805)- This was not set in some rare edge case scenarios, and created situations were legacy syncs would always be re-triggered during full syncs.
- We now verify this field is correctly set, and also catch empty objects for
UserStorageSyncedWallet.
- Bump
@metamask/base-controllerfrom^8.4.0to^8.4.1(#6807)
- Re-introduce computed names for account groups (#6758)
- Those names are computed using the old internal account names, allowing to automatically migrate them.
- We only consider EVM account names.
- This automatically handles conflicting names, similarly to backup & sync (adding a suffix
(n)in case of conflicts.
- Bump
@metamask/utilsfrom^11.8.0to^11.8.1(#6708)
- Add more internal logs (#6730)
- Preverve import time for account groups (#6727)
- We now wait sort accounts by their
importTimebefore re-building the tree.
- We now wait sort accounts by their
- Prevent
:account{Added,Removed}to be used ifinithas not been called yet (#6717)- We now wait for
initto have been called at least once. Clients will need to ensure internal accounts are fully ready before callinginit. - This should also enforce account group ordering, since all accounts will be ready to consume right away.
- We now wait for
- Add
reinitmethod (#6709)- This method can be used if we change the entire list of accounts of the
AccountsControllerand want to re-initilize the tree with it.
- This method can be used if we change the entire list of accounts of the
- Implicitly call
initbefore mutating the tree (#6709)- This ensure the tree is always using existing accounts before inserting/removing any new accounts if
inithas not been called yet.
- This ensure the tree is always using existing accounts before inserting/removing any new accounts if
- Fix use of unknown
group.metadata.namewhen checking for group name uniqueness (#6706) - Added logic that prevents an account within a group from being out of order (#6683)
- Set the
setAccountGroupName's optionautoHandleConflicttotruefor all backup & sync operations (#6697) - Add new group naming for non-HD keyring accounts (#6679, #6696)
- Hardware-wallet account groups are now named: "Ledger|Trezor|QR|Lattice|OneKey Account N".
- Private key account groups are now named: "Imported Account N".
- Snap account groups are now named: "Snap Account N".
- Account group names now use natural indexing as a fallback (#6677, #6679, #6696)
- If a user names his accounts without any indexes, we would just use the number of accounts to compute the next available index.
- Fix group naming for non-HD keyring accounts (#6677, #6679)
- Previously, the first non-HD keyring account would start as
Account 2as opposed toAccount 1and thus subsequent group names were off as well.
- Previously, the first non-HD keyring account would start as
- BREAKING: Bump peer dependency
@metamask/multichain-account-servicefrom^0.8.0to^1.0.0(#6652, #6676)
- Set
lastUpdatedAtto0when generating default account group names (#6672)- This created conflicts with backup and sync, where newly created local groups' names were taking precedence over user-defined backed up names.
- Add
autoHandleConflictparameter tosetAccountGroupNamemethod for automatic conflict resolution with suffix generation (#6601)
- Computed names (inherited from previous existing accounts) is disabled temporarily (#6601)
- They do interfere with the naming mechanism, so we disable them temporarily in favor of the new per-wallet sequential naming.
- Fix multi-wallet account group naming inconsistencies and duplicates (#6601)
- Implement proper per-wallet sequential numbering with highest account index parsing.
- Add name persistence during group initialization to ensure consistency across app restarts.
- Single group sync events will not get enqueued anymore if a full sync is in progress (#6651)
- This prevents too many unnecessary storage fetches (which would prevent being rate limited).
- This could rarely lead to inconsistencies until the next single updates or next full sync.
- Export user storage paths for account syncing (#6643)
- Swallow group creation errors in backup and sync
createMultichainAccountGroup(#6642)
- Remove full sync triggers when single sync operations are enqueued and
hasSyncedAtLeastOnceisfalse(#6634)
- BREAKING: Use
:getSelectedMultichainAccountinstead of:getSelectedAccountto compute currently selected account group (#6608)- Coming from the old account model, a non-EVM account could have been selected and the lastly selected EVM account might not be using the same group index.
- Bump
@metamask/utilsfrom^11.4.2to^11.8.0(#6588) - Bump
@metamask/base-controllerfrom^8.3.0to^8.4.0(#6632)
- Check for group existence prior to emitting analytics event in
createMultichainAccountGroup(#6582) - Fix logger initialization (#6581)
- There was a circular dependency between the controller and the logger itself, preventing the logger to be initialized properly.
- Add
AccountWalletObject.statussupport (#6571, #6578)- The
statusfield will now report the current wallet status. - Uses
MultichainAccountServiceto report on-going operations (discovery, alignment, account creations) forAccountWalletEntropyObjectmultichain account wallet objects.
- The
- BREAKING: Bump peer dependency
@metamask/multichain-account-servicefrom^0.7.0to^0.8.0(#6571, #6578) - BREAKING: Bump peer dependency
@metamask/account-apifrom^0.9.0to^0.12.0(#6560)
- BREAKING: Add backup and sync capabilities (#6344)
- New
syncWithUserStorage()andsyncWithUserStorageAtLeastOnce()method for manual sync triggers, replacingUserStorageController:syncInternalAccountsWithUserStorageusage in clients. BackupAndSyncServicewith full and atomic sync operations for account tree data persistence.- Bidirectional metadata synchronization for wallets and groups with user storage.
- Automatic sync triggers on metadata changes (rename, pin/hide operations).
- New
isBackupAndSyncInProgressstate property to track sync status. - Analytics event tracking and performance tracing for sync operations.
- Rollback mechanism for failed sync operations with state snapshot/restore capabilities.
- Support for entropy-based wallets with multichain account syncing.
- Legacy account syncing compatibility for seamless migration.
- Optional configuration through new
AccountTreeControllerConfig.backupAndSyncoptions. - Add
@metamask/superstructfor data validation.
- New
- BREAKING: Add
@metamask/multichain-account-servicepeer dependency (#6344) - BREAKING: Add
@metamask/profile-sync-controllerpeer dependency (#6344, #6558) - Add two new controller state metadata properties:
includeInStateLogsandusedInUi(#6470)
- Account group name uniqueness validation now scoped to wallet level instead of global (#6550)
isAccountGroupNameUniquenow checks for duplicates only within the same wallet, allowing different wallets to have groups with the same name.- Function now throws an error for non-existent group IDs instead of returning
true. - Updated
setAccountGroupNamebehavior to allow duplicate names across different wallets.
- Fix account group naming inconsistency across app restarts where non-EVM account names would bubble up inappropriately (#6479)
- Add unique name validation for account groups to prevent duplicate group names (#6492)
setAccountGroupNamenow validates that group names are unique across all groups.- Added
isAccountGroupNameUniqueutility function to check name uniqueness. - Names are trimmed of leading/trailing whitespace before comparison to prevent accidental duplicates.
- BREAKING: Remove support for
AccountsController:accountRenamedevent handling (#6438) - Bump
@metamask/base-controllerfrom^8.2.0to^8.3.0(#6465)
- Publish
AccountTreeController:selectedAccountGroupChangeduringinit(#6431)
- Add
AccountTreeController:accountTreeChangeevent (#6400) - Add
AccountTreeController:selectedAccountGroupChangeevent (#6400)
- Add missing export for
AccountTreeControllerGetAccountsFromSelectedAccountGroupAction(#6404) - Add
AccountTreeController:setAccount{WalletName,GroupName,GroupPinned,GroupHidden}actions (#6404)
- Bump
@metamask/base-controllerfrom^8.1.0to^8.2.0(#6355)
- BREAKING: Bump peer dependency
@metamask/accounts-controllerfrom^32.0.0to^33.0.0(#6345) - 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
- Add fallback naming for account groups when rule-based naming fails (#6246)
- Implements "indexes per wallet" strategy (Wallet 1 → Account 1, Account 2; Wallet 2 → Account 1, Account 2)
- Ensures new groups get proper sequential names within each wallet
- BREAKING: Add support for
AccountsController:accountRenamedevent handling for state 1 and legacy account syncing compatibility (#6251) - Add
AccountTreeController:getAccountsFromSelectedAccountGroupaction (#6266, #6248, #6265)- This action can be used to get all accounts from the currently selected account group.
- This action also support
AccountSelectorsupport to filter out accounts based on some criterias.
- Add persistence support for user customizations (#6221)
- New
accountGroupsMetadata(of new typeAccountTreeGroupPersistedMetadata) andaccountWalletsMetadata(of new typeAccountTreeWalletPersistedMetadata) state properties to persist custom names, pinning, and hiding states. - Custom names and metadata survive controller initialization and tree rebuilds.
- Support for
lastUpdatedAttimestamps for Account Syncing V2 compatibility.
- New
- Add setter methods for setting custom account group names, wallet names and their pinning state and visibility (#6221)
- Add
{wallet,group}.typetag (#6214)- This
typecan be used as a tag to strongly-type (tagged-union) theAccountGroupObject. - The
typefromwallet.metadatahas been moved towallet.typeinstead and can be used to (tagged-union) theAccountWalletObject.
- This
- Add
{wallet,group}.metadatametadata object (#6214, #6258)- Given the
{wallet,group}.typeyou will now have access to specific metadata information (e.g.group.metadata.groupIndexfor multichain account groups orwallet.metadata.entropy.idfor multichain account wallets)
- Given the
- Automatically prune empty groups and wallets upon account removal (#6234)
- This ensures that there aren't any empty nodes in the
AccountTreeControllerstate.
- This ensures that there aren't any empty nodes in the
- BREAKING: Bump peer dependency
@metamask/account-apifrom^0.3.0to^0.9.0(#6214, #6216, #6222, #6248) - BREAKING: Remove use of in-memory wallets and groups (
AccountTree{Wallet,Object}) (#6265)- Those types are not ready to be used and adds no value for now.
- BREAKING: Move
wallet.metadata.typetag towalletnode (#6214)- This
typecan be used as a tag to strongly-type (tagged-union) theAccountWalletObject.
- This
- Defaults to the EVM account from a group when using
setSelectedAccountGroup(#6208)- In case no EVM accounts are found in a group (which should not be possible), it will defaults to the first account of that group.
- Enhanced customization priority hierarchy in tree building (#6221)
- Custom user names now take priority over default rule-generated names.
- Add BIP-44/multichain accounts support (#6185)
- Those are being attached to the
entropywallet category.
- Those are being attached to the
- BREAKING: Bump peer dependency
@metamask/account-apifrom^0.2.0to^0.3.0(#6165) - Add
selectedAccountGroupstate and bidirectional synchronization withAccountsController(#6186)- New
getSelectedAccountGroup()andsetSelectedAccountGroup()methods. - Automatic synchronization when selected account changes in AccountsController.
- New action types
AccountTreeControllerGetSelectedAccountGroupActionandAccountTreeControllerSetSelectedAccountGroupAction.
- New
- Now use one account group per account for
snapandkeyringwallet categories (#6185)- We used to group all accounts under the
'default'group, but we now compute the group ID using the address of each accounts.
- We used to group all accounts under the
- Compute account group name based on their underlying account. (#6185)
- This replaces the previous
'Default'name for groups.
- This replaces the previous
- BREAKING: Bump peer dependency
@metamask/accounts-controllerfrom^31.0.0to^32.0.0(#6171)
- BREAKING: Add
@metamask/account-apipeer dependency (#6115, #6146) - BREAKING: Types
AccountWalletandAccountGrouphave been respectively renamed toAccountWalletObjectandAccountGroupObject(#6115)- Those names are now used by the
@metamask/account-apipackage to define higher-level interfaces.
- Those names are now used by the
- 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) - Properly export
AccountWalletCategoryconstant and conversion functions (#6062)
- BREAKING: No longer export
AccountWalletCategory,toAccountWalletId,toAccountGroupIdandtoDefaultAccountGroupId(#6115)- You should now import them from the
@metamask/account-apipackage (peer dependency).
- You should now import them from the
- Update wallet names (#6024)
- Export ID conversions functions and constants (#6006)
- BREAKING: Bump peer dependency
@metamask/accounts-controllerto^31.0.0(#5999)
- Fix
AccountWallet.metadatatype (#5947)- Was using
AccountGroupMetadatainstead ofAccountWalletMetadata.
- Was using
- Add
AccountTreeControllerStateChangeEventtoAccountTreeControllerEvents(#5958)
- Initial release (#5847)
- Grouping accounts into 3 main categories: Entropy source, Snap ID, keyring types.