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.
- Add SRP profile pairing support (Accounts ADR 0006) (#8504, #8642)
- Pairing runs at the end of
performSignIn; pair failures are swallowed and retried on the next gate fire. - Add
needsProfilePairing?: booleanto state (defaultstrue, cleared on successful pair, re-armed viarequestProfilePairing()). Optional in the type to keep partial-state selectors assignable; treatundefinedastrue. - Add
requestProfilePairing()(andAuthenticationController:requestProfilePairingaction) for clients to signal SRP-set changes so the next auto-sign-in cycle re-pairs. - Upgrade path: existing signed-in users re-pair automatically on the first auto-sign-in cycle. Pre-pairing sessions miss
canonicalProfileIdand re-login on the nextgetAccessToken, so the pair call runs against fresh v2 JWTs — no client migration needed. - JWT staleness note: a newly added SRP's JWT keeps
sub = alias_iduntil that SRP's session is re-logged-in. User storage is unaffected (it keys onx-profile-id, notsub). - Add
canonicalProfileIdtoUserProfile— the unified profile ID across paired SRPs - Add
ProfileAliastype for transient alias data returned by the pairing API - Add
pairSrpProfilesmethod toSRPJwtBearerAuthandJwtBearerAuth - Add
ProfileSignInEvent(AuthenticationController:profileSignIn) emitted after successful pairing when the canonical profile ID changes or new aliases are returned - Send
X-MetaMask-Profile-Pairing: enabledheader on all/srp/loginrequests - Resolve original per-SRP
profileIdfromprofile_aliasesusingcomputeIdentifierId - Propagate canonical profile ID to all
srpSessionDataentries after pairing - Add
refreshCanonicalProfileIdmethod — forces a fresh canonical retrieval from the server (1 primary SRP login) and propagates it to all cached SRP sessions. For best-effort reads, usegetSessionProfile().canonicalProfileIdinstead. - Force re-login when cached session is missing
canonicalProfileId
- Pairing runs at the end of
- Add optional
getAppVersioncallback toMetaMetricsAuth, forwarded asmetametrics.app_versionin thePOST /api/v2/srp/loginpayload. (#8626)
- Bump
@metamask/keyring-controllerfrom^25.1.1to^25.5.0(#8363, #8634, #8665, #8722) - Bump
@metamask/messengerfrom^1.0.0to^1.2.0(#8364, #8373, #8632) - Bump
@metamask/base-controllerfrom^9.0.1to^9.1.0(#8457)
- Bump
@metamask/snaps-controllersfrom^17.2.0to^19.0.0(#8319) - Bump
@metamask/snaps-sdkfrom^10.3.0to^11.0.0(#8319) - Bump
@metamask/snaps-utilsfrom^11.7.0to^12.1.2(#8319)
- 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/address-book-controllerfrom^7.0.1to^7.1.1(#8225, #8317)
- Expose missing public
UserStorageControllermethods through its messenger (#7976)- The following actions are now available:
UserStorageController:performDeleteStorageAllFeatureEntriesUserStorageController:listEntropySourcesUserStorageController:setIsBackupAndSyncFeatureEnabledUserStorageController:setIsContactSyncingInProgressUserStorageController:syncContactsWithUserStorage
- Corresponding action types (e.g.
UserStorageControllerPerformDeleteStorageAllFeatureEntriesAction) are available as well.
- The following actions are now available:
- BREAKING: Add client-side JWT
expclaim validation to prevent stale cached tokens from being returned (#8144)validateLoginResponsenow decodes the JWTexpclaim and rejects tokens that have actually expired, regardless of client-side TTL tracking (obtainedAt/expiresIn)- Non-JWT access tokens are now rejected as invalid. In production this has no effect (access tokens are always JWTs from the OIDC server), but E2E test mocks that use raw identifier strings as access tokens must be updated.
getMockAuthAccessTokenResponsenow wraps identifiers in a JWT; consumers should usegetE2EIdentifierFromJwt(newly exported) to extract the identifier from the bearer token in mock servers.
- BREAKING: Standardize names of
AuthenticationControllerandUserStorageControllermessenger action types (#7976)- All existing types for messenger actions have been renamed so they end in
Action(e.g.AuthenticationControllerPerformSignIn->AuthenticationControllerPerformSignInAction). You will need to update imports appropriately. - This change only affects the types. The action type strings themselves have not changed, so you do not need to update the list of actions you pass when initializing
AuthenticationControllerandUserStorageControllermessengers.
- All existing types for messenger actions have been renamed so they end in
- Fix
AuthenticationControllersilently discarding tokens whenentropySourceIdisundefined(#8144)getBearerToken,getSessionProfile, andgetUserProfileLineagenow resolveundefinedentropySourceIdto the primary SRP entropy source ID via the message-signing snap before delegating to the auth SDK- This also eliminates a login deduplication race condition where
getBearerToken(undefined)andgetBearerToken("primary-srp-id")would trigger two independent OIDC logins for the same identity
- Update
getUserProfileLineageto accept an optionalentropySourceIdparameter (#8144)
- Centralize authentication error handling into a single
throwServiceErrorhelper for consistent error management across all service functions (#7721)- This fixes authentication services crashing when server returns non-JSON error responses.
- Bump
@metamask/snaps-controllersfrom^14.0.1to^17.2.0(#7550) - 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, #7713)
- The dependencies moved are:
@metamask/address-book-controller(^7.0.1)@metamask/keyring-controller(^25.1.0)@metamask/snaps-controllers(^14.0.1)
- 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/keyring-controllerfrom^24.0.0to^25.0.0(#7202) - Bump
@metamask/address-book-controllerfrom^7.0.0to^7.0.1(#7202) - Add rate limit (429) handling with automatic retry in authentication flow (#6993)
- Update authentication services to throw
RateLimitedErrorwhen encountering 429 responses. - Improve Authentication errors by adding the HTTP code in error messages.
- Add rate limit retry logic to
SRPJwtBearerAuthwith configurable cooldown viarateLimitRetry.cooldownDefaultMsoption (defaults to 10 seconds). - Non-429 errors are thrown immediately without retry, delegating retry logic to consumers.
- Update authentication services to throw
- BREAKING: Use new
Messengerfrom@metamask/messenger(#6533)- Previously,
AuthenticationControllerandUserStorageControlleraccepted aRestrictedMessengerinstance from@metamask/base-controller.
- Previously,
- BREAKING: Metadata property
anonymousrenamed toincludeInDebugSnapshot(#6533) - BREAKING: Bump
@metamask/address-book-controllerfrom^6.1.1to^7.0.0(#6962) - BREAKING: Bump
@metamask/keyring-controllerfrom^23.0.0to^24.0.0(#6962) - Bump
@metamask/base-controllerfrom^8.4.2to^9.0.0(#6962)
- Bump
@metamask/base-controllerfrom^8.4.1to^8.4.2(#6917)
- Bump
@metamask/base-controllerfrom^8.4.0to^8.4.1(#6807)
- Use deferred promises for encryption/decryption KDF operations (#6736)
- That will prevent duplicate KDF operations from being computed if one with the same options is already in progress.
- For operations that already completed, we use the already existing cache.
- Bump
@metamask/utilsfrom^11.8.0to^11.8.1(#6708) - Bump
@metamask/keyring-apifrom^20.1.0to^21.0.0(#6560) - Bump
@metamask/keyring-internal-apifrom^8.1.0to^9.0.0(#6560) - Strip
srpSessionData.token.accessTokenfrom state logs (#6553)- We haven't started using the
includeInStateLogsmetadata yet in clients, so this will have no functional impact. This change brings this metadata into alignment with the hard-coded state log generation performed by clients.today.
- We haven't started using the
- Add dependency on
@metamask/utils(#6553) - Bump
@metamask/base-controllerfrom^8.3.0to^8.4.0(#6632)
- BREAKING: Add missing
@metamask/address-book-controllerpeer dependency (#6344) - Add two new controller state metadata properties:
includeInStateLogsandusedInUi(#6470)
- Implement deferred login pattern in
SRPJwtBearerAuthto prevent race conditions during concurrent authentication attempts (#6353)- Add
#deferredLoginmethod that ensures only one login operation executes at a time using Promise map caching
- Add
- Bump
@metamask/base-controllerfrom^8.1.0to^8.3.0(#6355, #6465)
- BREAKING: Remove
@metamask/accounts-controllerpeer dependency (#6344) - BREAKING: Remove all account syncing code & logic (#6344)
UserStorageControllernow only holds the account syncing enablement status, but the logic itself has been moved to@metamask/account-tree-controller
- Remove
UserStorageControlleroptional config callbackgetIsMultichainAccountSyncingEnabled, andgetIsMultichainAccountSyncingEnabledpublic method / messenger action (#6344)
UserStorageControlleroptional config callbackgetIsMultichainAccountSyncingEnabled, andgetIsMultichainAccountSyncingEnabledpublic method / messenger action (#6215)- This callback needs to be wired to client specific selectors in order to fetch the value of the feature flag dynamically
- If
true, Account syncing will stop pushing new data to the user storage and only act as an account restoration method that will be fired before multichain account syncing for legacy compatibility - This is done because
AccountTreeControllerwill become responsible for Multichain Account syncing
- 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
@noble/hashesfrom^1.4.0to^1.8.0(#6101) - Bump
@noble/ciphersfrom^0.5.2to^1.3.0(#6101) - 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
- BREAKING: Remove
UserStorageController:saveInternalAccountToUserStoragepublic method (#6215)
- BREAKING: Rename
AuthenticationController:getUserProfileMetaMetricstoAuthenticationController:getUserProfileLineage(#6211)- Rename API endpoint from
/api/v2/profile/metametricsto/api/v2/profile/lineage
- Rename API endpoint from
- BREAKING: Bump peer dependency
@metamask/accounts-controllerfrom^31.0.0to^32.0.0(#6171)
- Add performance tracing to user storage syncing operations (contacts and accounts) (#6050)
- Add
envoptions in bothAuthenticationControllerandUserStorageController'sconfigconstructor param (#6082)- This will let consumers choose to use prod, dev or UAT environments for Identity operations
- BREAKING: Remove schema enforcement for user storage paths (#6075)
- This will improve DX by preventing developers from having to update the schema before using the SDK or Controllers for their features.
- BREAKING: Remove network syncing code (#6081)
- This code has never been used in production, and won't likely be used in the future
- Remove
@metamask/network-controllerdependency and peerDependency
- Add new
AuthenticationController:getUserProfileMetaMetricsmethod (#6068)- This method fetches data using the Authentication API, returning all MetaMetrics sessions related to the currently authenticated user, in the form of
typeof UserProfileMetaMetrics
- This method fetches data using the Authentication API, returning all MetaMetrics sessions related to the currently authenticated user, in the form of
- 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)
- BREAKING: Bump peer dependency
@metamask/accounts-controllerto^31.0.0(#5999) - BREAKING: Bump peer dependency
@metamask/network-controllerto^24.0.0(#5999)
- BREAKING: Add Contacts Syncing, a Backup and Sync feature (#5776)
- React to contacts update and deletion events from
AddressBookControllerand update the corresponding entries in user storage - Dispatch downward "Big sync" after onboarding & wallet unlock
- Big sync will download contacts from user storage and resolve potential conflicts
- React to contacts update and deletion events from
- Add
EventQueueclass util to guarantee the order of some user-storage updates (#5937)- Add an instance of
EventQueuetoUserStorageController - Event subscriptions for
AccountsController:accountAddedandAccountsController:accountRenamedare now pushing their callbacks to theUserStorageControllerinstance ofEventQueue, so that we stay in control of the order these callbacks are fulfilled.
- Add an instance of
- BREAKING: Add multi-SRP support for authentication and user storage (#5753)
- Add
entropySourcebased authentication support for multiple SRPs - Add
entropySourceoptional parameter forUserStorageControllerCRUD methods - Rename
sessionDatainAuthenticationControllerStatetosrpSessionData - Update
AuthenticationController.performSignInto returnstring[]rather thanstring - Add
AccountsController:updateAccountsas a required allowed action to theUserStorageControllermessenger - Add
listEntropySourcestoUserStorageController - Render
UserStorageController.syncInternalAccountsWithUserStoragecompatible with multi-SRP
- Add
- BREAKING: bump
@metamask/accounts-controllerpeer dependency to^30.0.0(#5888) - BREAKING: bump
@metamask/snaps-controllerspeer dependency to^12.0.0(#5871) - BREAKING: bump
@metamask/providerspeer dependency to^22.0.0(#5871)
- BREAKING: bump
@metamask/keyring-controllerpeer dependency to^22.0.0(#5802) - BREAKING: bump
@metamask/accounts-controllerpeer dependency to^29.0.0(#5802)
- BREAKING: Replace all "Profile Syncing" mentions to "Backup & Sync" (#5686)
- Replaces state properties
isProfileSyncingEnabledtoisBackupAndSyncEnabled, andisProfileSyncingUpdateLoadingtoisBackupAndSyncUpdateLoading
- Replaces state properties
- Remove metadata for unsupported keyrings (#5725)
- BREAKING: Bump
@metamask/accounts-controllerpeer dependency from^27.0.0to^28.0.0(#5763) - BREAKING: Bump
@metamask/snaps-controllerspeer dependency from^9.19.0to^11.0.0(#5639) - BREAKING: Bump
@metamask/providerspeer dependency from^18.1.1to^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)
- BREAKING: Add new public method
setIsBackupAndSyncFeatureEnabledtoUserStorageController(#5636)- This replaces
enableProfileSyncinganddisableProfileSyncingand will be used as the main method to enable and disable backup and sync features from now on.
- This replaces
- BREAKING: Add new
isAccountSyncingEnabledstate property toUserStorageController(#5636)- This property is
trueby default.
- This property is
- BREAKING: Remove
isAccountSyncingEnabledenvproperty fromUserStorageControllerconstructor (#5629) - BREAKING: Remove unused action handlers:
setIsBackupAndSyncFeatureEnabled,syncInternalAccountsWithUserStorageandsaveInternalAccountToUserStorage. (#5638)- These actions should not be callable through the messaging system.
- Bump accounts dependencies (#5565)
- Update origin used for
SnapController:handleRequest(#5616)
- BREAKING: Bump peer dependency
@metamask/accounts-controllerto^27.0.0(#5507) - BREAKING: Bump peer dependency
@metamask/network-controllerto^23.0.0(#5507)
- Peer dependencies
@metamask/keyring-controllerand@metamask/network-controllerare no longer also direct dependencies (#5464))
- Add primary SRP switching support for
AuthenticationControllerandUserStorageController(#5478)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^21.0.0(#5439) - BREAKING: Bump
@metamask/accounts-controllerpeer dependency to^26.0.0(#5439) - BREAKING
UserStorageControllerandAuthenticationControllernow use the SDK under the hood (#5413)- BREAKING
AuthenticationControllerstate entrysessionDatahas changed shape to fully reflect theLoginResponseSDK type. - BREAKING
UserStorageControllercannot use theAuthenticationController:performSignOutaction anymore.
- BREAKING
- BREAKING: Bump
@metamask/keyring-internal-apifrom^5.0.0to^6.0.0(#5347)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^20.0.0(#5426) - BREAKING: Bump
@metamask/accounts-controllerpeer dependency to^25.0.0(#5426) - Bump
@metamask/keyring-internal-apifrom^4.0.3to^5.0.0(#5405)
- Bump
@metamask/keyring-controller"from^19.2.0to^19.2.1(#5373) - Bump
@metamask/keyring-api"from^17.0.0to^17.2.0(#5366)
- Create RPC middleware using RPC services (#5290)
- Use
KeyringController:withKeyringfor account syncing operations (#5345)- Add accounts in bulk during big sync
- Filter and keep only HD accounts from the primary SRP for all account sync operations
- Bump
@metamask/keyring-controllerdependency from^19.1.0to^19.2.0(#5357)
- Add
perform{BatchSetStorage,DeleteStorage,BatchDeleteStorage}as messenger actions (#5311) - Add optional
validateAgainstSchemaoption when creating user storage entry paths (#5326)
- BREAKING: Bump
@metamask/accounts-controllerpeer dependency from^23.0.0to^24.0.0(#5318) - Change
maxNumberOfAccountsToAdddefault value from100toInfinity(#5322)
- Removed unused events from
UserStorageController(#5324)
- Bump
@metamask/base-controllerfrom^7.1.1to^8.0.0(#5305) - Bump
@metamask/keyring-controllerfrom^19.0.6to^19.0.7(#5305) - Bump
@metamask/network-controllerfrom^22.2.0to^22.2.1(#5305)
- BREAKING: Bump
@metamask/accounts-controllerpeer dependency from^22.0.0to^23.0.0(#5292)
- Improve logic & dependencies between profile sync, auth, user storage & notifications (#5275)
- Mark
@metamask/snaps-controllerspeer dependency bump as breaking in CHANGELOG (#5267) - Fix eslint warnings & errors (#5261)
- Rename
ControllerMessengertoMessenger(#5244) - Bump snaps-sdk to v6.16.0 (#5220)
- BREAKING: Bump
@metamask/snaps-controllerspeer dependency from^9.10.0to^9.19.0(#5265) - Bump
@metamask/snaps-sdkfrom^6.16.0to^6.17.1(#5265) - Bump
@metamask/snaps-utilsfrom^8.9.0to^8.10.0(#5265) - Bump
@metamask/keyring-api"from^16.1.0to^17.0.0(#5280)
- BREAKING: Remove metametrics dependencies in UserStorageController (#5278)
- BREAKING: Bump
@metamask/accounts-controllerpeer dependency from^21.0.0to^22.0.0(#5218) - Bump
@metamask/keyring-apifrom^14.0.0to^16.1.0(#5190), (#5208)
- Bump
@metamask/keyring-apifrom^13.0.0to^14.0.0(#5177)
- Persist
isAccountSyncingReadyToBeDispatchedstate value (#5147)
- Add optional sentry context parameter to erroneous situation callbacks (#5139)
- BREAKING: Bump
@metamask/accounts-controllerpeer dependency from^20.0.0to^21.0.0(#5140) - Bump
@metamask/base-controllerfrom7.1.0to^7.1.1(#5135) - Bump
@metamask/keyring-apifrom^12.0.0to^13.0.0(#5066) - Bump
@metamask/keyring-internal-apifrom^1.0.0to^2.0.0(#5066), (#5136) - Bump
@metamask/keyring-controllerfrom^19.0.2to^19.0.3(#5140)
- Add a
customProvideroption to the sdkJwtBearerAuthclass (#5105)
- Bump
eslintto^9.11.1and migrate to flat config (#4727) - Bump
@metamask/keyring-apifrom^12.0.0to^13.0.0and@metamask/keyring-internal-apifrom^1.0.0to^1.1.0(#5066)
- feat: improve profile sync services logs (#5101)
- feat: decouple account sync logic from
UserStorageController(#5078) - Bump
@metamask/base-controllerfrom^7.0.0to^7.1.0(#5079)
- 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)
- Revamp user storage encryption process (#4981)
- Stop using a random salt when generating scrypt keys and use a shared one
- Re-encrypt data fetched by
getUserStorageAllFeatureEntriesandgetUserStoragewith the shared salt if fetched entries were encrypted with random salts
- Remove
#assertLoggedIn()assertion when signing out a user, ensuringperformSignOutdoes not error when a user is already signed out (#5013)
- Add optional constructor arguments for
config.networkSyncingto UserStorageController:maxNumberOfAccountsToAdd,onNetworkAdded,onNetworkUpdated,onNetworkRemoved(#4701) - Add new UserStorageController method
syncNetworks, which can be used to initiate the main network sync (#4701) - Add optional property
hasNetworkSyncingSyncedAtLeastOnceto UserStorageController state (#4701)
- BREAKING: The controller messenger must now allow the actions
NetworkController:getState,NetworkController:addNetwork,NetworkController:removeNetwork, andNetworkController:updateNetwork(#4701) - BREAKING: The controller messenger must now allow the event
NetworkController:networkRemoved(#4701) - Bump
@metamask/keyring-controllerfrom^19.0.0to^19.0.1(#5012) - Bump
@metamask/network-controllerfrom^22.0.2to^22.1.0(#5012)
- 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:
- Fix user storage controller to use the user-storage batch API to upsert remote networks rather than upserting them one at a time (#4701)
- 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-apiloglevelnocksiwe
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency from^18.0.0to^19.0.0(#4195) - BREAKING: Bump
@metamask/accounts-controllerpeer dependency from^19.0.0to^20.0.0(#4195)
- new analytics callback and various helpers & improvements (#4944)
- new
UserStorageControllerstate keys:hasAccountSyncingSyncedAtLeastOnceandisAccountSyncingReadyToBeDispatched - new
onAccountSyncErroneousSituationanalytics callback to track how often erroneous situations happen during account syncing
- new
- set
hasAccountSyncingSyncedAtLeastOncealso for a profile id that has never synced accounts before (#4944)
- add batch delete endpoint support for both UserStorageController & SDK (#4938)
- use better type system for user storage (#4907)
- account sync infinite account creation bug (#4933)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency from^17.2.0to^18.0.0(#4915) - BREAKING: Bump
@metamask/accounts-controllerpeer dependency from^18.1.1to^19.0.0(#4915)
- BREAKING: Bump
@metamask/network-controllerpeer dependency to^22.0.0(#4841)
- prevent multiple parallel account syncs by checking the value of
isAccountSyncingInProgressbefore dispatching account syncing (#4901)
- add support for DELETE ONE endpoint (#4776)
- imported accounts won't be synced anymore by account syncing (#4777)
- add DELETE endpoint support (#4758)
- BREAKING react native scrypt now takes a
UInt8Arraypassword argument instead of astring(#4755)
- Account syncing performance issues and bugs (#4746)
- Batch
GET/PUTwill now encrypt and decrypt sequentially in order to leverage the in-memory cache nameLastUpdatedAtwill stop being saved to user storage if account name is a default namewaitForExpectedValuehas been removed and will stop waiting forAccountsController:accountAddedcallbackrandomBytesleftover from sync -> async encryption migration was removed
- Batch
- Only fire
onAccountNameUpdatedwhen account name has changed (#4735)
- 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
- improve account syncing performance (#4726)
- check if
isEvmAccountTypebefore saving an account in user storage in account syncing - check for correct
KeyringTypebefore saving an account in user storage in account syncing - wait for
AccountsController:accountAddedevent to fire before adding another account in account syncing
- check if
- update 'eth-{simple,hd,snap}-keyring' + 'keyring-api' (#4713)
- move and organize shared profile sync dependencies (#4717)
- fix: profile-sync-controller mobile compilation issues (#4721)
- mobile does not support exported async arrow functions, so needed to convert these into normal async functions
- BREAKING update profile-sync notification settings path hash (#4711)
- changing this path also means the underlying storage hash has changed. But this will align with our existing solutions that are in prod.
- update subpath exports to use new .d.cts definition files. (#4709)
- move profile-sync-sdk snap methods to snap auth class (#4708)
- move and validate
connectSnapandisSnapConnectedmethods to only be available for SRP auth.
- move and validate
- test: remove unused test mock (#4703)
- Add network synchronisation logic (#4694, #4687, #4685, #4684)
- Add a
canSynccheck for account synchronisation (#4690) - Add
onAccountAddedandonAccountNameUpdatedevents toUserStorageController(#4707)
- 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)
- BREAKING: Remove
getAccountByAddressaction (#4693)
- 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.
- Remove extra slash when constructing user storage url (#4702)
- Await encryption promise (#4705)
- add isSnapConnected method to the Authentication SDK (#4668)
- add
accountAddedandaccountRenamedevents when triggering account syncing (#4665) - prevent accounts controller events being used when sync is in progress (#4675)
- add
isAccountSyncingInProgresstoUserStorageController - add
isAccountSyncingInProgresschecks to abort processingaccountAddedandaccountRenamedevents.
- add
- account sync throttling (#4675)
- remove
maxSyncInterval;lastSyncedAt;shouldSyncfromUserStorageController
- remove
- add
maxSyncIntervalfor account syncing toUserStorageControllerprevent multiple sync requests (#4659) - add optional
NativeScryptproperty toUserStorageControllerto allow the scrypt implementation to be swapped out for a native version. Improving mobile performance (#4656)
- add granular account syncing (#4629)
- add accounts user storage schema
- add method
saveInternalAccountToUserStoragetoUserStorageController - add method
syncInternalAccountsWithUserStoragetoUserStorageController - add
@metamask/accounts-controllerdev dependency - add
@metamask/keyring-apidev dependency
- add infura OIDC identifier (#4654)
- define and export new types:
AuthenticationControllerGetStateAction,AuthenticationControllerStateChangeEvent,Events(#4633) - SDK and controller support for
GET /api/v1/userstorage/:featureendpoint (#4626)- add method
performGetStorageAllFeatureEntriestoUserStorageController - add
ALLOW_ARBITRARY_KEYStoUSER_STORAGE_SCHEMAto allow wildcard/getAll for entries for a feature
- add method
- add subpath exports to
@metamask/profile-sync-controller(#4604)- add
@metamask/profile-sync-controller/sdkexport - add
@metamask/profile-sync-controller/user-storageexport - add
@metamask/profile-sync-controller/authexport
- add
- Bump
typescriptfrom~5.1.6to~5.2.2(#4584) - Fix controllers with missing or incorrect messenger action/event types (#4633)
- BREAKING:
AuthenticationControllerMessengermust allow internal events defined in theEventstype (#4633) AuthenticationControllerActionsis widened to include theAuthenticationController:getStateaction (#4633)- Replaced
@metamask/profile-sync-controller/sdkto use the same encryption file asUserStorageController(#4649)
- update subpath exports internal
package.jsonfiles to resolvejest-haste-maperrors (#4650)
- unlock checks for when controller methods are called (#4569)
- BREAKING made
MOCK_ENCRYPTED_STORAGE_DATAfixture a function to be lazily evaluated (#4592) - Bump
typescriptfrom~5.0.4to~5.1.6(#4576)
- Add and export object
USER_STORAGE_SCHEMA, functiongetFeatureAndKeyFromPath, and typeUserStoragePath(#4543) - Add
connectSnapmethod to theJwtBearerAuthclass for connecting to snap after initializing the Profile Sync SDK (#4560)
- BREAKING: Enforce
UserStorageSchemausage in all functions that get or set user storage (#4543)- Keeps user storage entries consistent, and improves DX for consumers of user storage.
- BREAKING: Remove
entryKeyfunction parameter fromperformGetStorageandperformSetStoragemethods ofUserStorageController, and replace withpathparameter of typeUserStoragePath. - BREAKING: Remove
entryKeyfunction parameter fromcreateEntryPath, and replace withpathparameter of typeUserStoragePath. - BREAKING: Remove
entryKeyproperty from typeUserStorageOptions, and replace withpathproperty of typeUserStoragePath.
- BREAKING: Bump peerDependency
@metamask/snaps-controllersfrom^8.1.1to^9.3.0(#3645) - Remove
@metamask/snaps-controllersdependency #4556- This was listed under
peerDependenciesalready, so it was redundant as a dependency.
- This was listed under
- Widen
isProfileSyncingEnabledproperty of theUserStorageControllerStatetype frombooleantoboolean | null(#4551) - Upgrade TypeScript version to
~5.0.4and setmoduleResolutionoption toNode16(#3645) - Bump
@metamask/base-controllerfrom^6.0.1to^6.0.2(#4544) - Bump
@metamask/snaps-sdkfrom^4.2.0to^6.1.1(#3645, #4547) - Add new dependency
@metamask/snaps-utils(#3645, #4547)
- Remove object
USER_STORAGE_ENTRIESand typeUserStorageEntryKeys(#4543)
-
added
LoginResponsevalidation in profile syncing SDK (#4541) -
added snap caching when calling the message signing snap (#4532)
- removed a server-side node dependency from profile-sync-sdk (#4539)
- removed a catch statement call in AuthenticationController to prevent infinite crashes. (#4533)
- Switch ethers to a devDependency (#4518)
-
added platform field when logging in to receive correct OIDC access token (#4480)
-
added metametrics validation in constructor (#4480)
- updated the
getMetaMetricsIdinterface to support async calls to metametrics ID (#4477)
- export
defaultStateforAuthenticationControllerandUserStorageController. (#4441)
AuthType,Env,Platformare changed from const enums to enums (#4441)
- Initial release