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/base-controller
from^7.0.0
to^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-api
from^10.1.0
to^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
getUserStorageAllFeatureEntries
andgetUserStorage
with the shared salt if fetched entries were encrypted with random salts
- Remove
#assertLoggedIn()
assertion when signing out a user, ensuringperformSignOut
does not error when a user is already signed out (#5013)
- Add optional constructor arguments for
config.networkSyncing
to 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
hasNetworkSyncingSyncedAtLeastOnce
to 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-controller
from^19.0.0
to^19.0.1
(#5012) - Bump
@metamask/network-controller
from^22.0.2
to^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-api
loglevel
nock
siwe
- BREAKING: Bump
@metamask/keyring-controller
peer dependency from^18.0.0
to^19.0.0
(#4195) - BREAKING: Bump
@metamask/accounts-controller
peer dependency from^19.0.0
to^20.0.0
(#4195)
- new analytics callback and various helpers & improvements (#4944)
- new
UserStorageController
state keys:hasAccountSyncingSyncedAtLeastOnce
andisAccountSyncingReadyToBeDispatched
- new
onAccountSyncErroneousSituation
analytics callback to track how often erroneous situations happen during account syncing
- new
- set
hasAccountSyncingSyncedAtLeastOnce
also 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-controller
peer dependency from^17.2.0
to^18.0.0
(#4915) - BREAKING: Bump
@metamask/accounts-controller
peer dependency from^18.1.1
to^19.0.0
(#4915)
- BREAKING: Bump
@metamask/network-controller
peer dependency to^22.0.0
(#4841)
- prevent multiple parallel account syncs by checking the value of
isAccountSyncingInProgress
before 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
UInt8Array
password argument instead of astring
(#4755)
- Account syncing performance issues and bugs (#4746)
- Batch
GET
/PUT
will now encrypt and decrypt sequentially in order to leverage the in-memory cache nameLastUpdatedAt
will stop being saved to user storage if account name is a default namewaitForExpectedValue
has been removed and will stop waiting forAccountsController:accountAdded
callbackrandomBytes
leftover from sync -> async encryption migration was removed
- Batch
- Only fire
onAccountNameUpdated
when 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-api
from^8.1.0
to^8.1.4
- improve account syncing performance (#4726)
- check if
isEvmAccountType
before saving an account in user storage in account syncing - check for correct
KeyringType
before saving an account in user storage in account syncing - wait for
AccountsController:accountAdded
event 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
connectSnap
andisSnapConnected
methods 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
canSync
check for account synchronisation (#4690) - Add
onAccountAdded
andonAccountNameUpdated
events toUserStorageController
(#4707)
- Bump
@metamask/snaps-sdk
from^6.1.1
to^6.5.0
(#4689) - Bump
@metamask/snaps-utils
from^7.8.1
to^8.1.1
(#4689) - Bump peer dependency
@metamask/snaps-controllers
from^9.3.0
to^9.7.0
(#4689)
- BREAKING: Remove
getAccountByAddress
action (#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
exports
field inpackage.json
linked 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
accountAdded
andaccountRenamed
events when triggering account syncing (#4665) - prevent accounts controller events being used when sync is in progress (#4675)
- add
isAccountSyncingInProgress
toUserStorageController
- add
isAccountSyncingInProgress
checks to abort processingaccountAdded
andaccountRenamed
events.
- add
- account sync throttling (#4675)
- remove
maxSyncInterval
;lastSyncedAt
;shouldSync
fromUserStorageController
- remove
- add
maxSyncInterval
for account syncing toUserStorageController
prevent multiple sync requests (#4659) - add optional
NativeScrypt
property toUserStorageController
to 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
saveInternalAccountToUserStorage
toUserStorageController
- add method
syncInternalAccountsWithUserStorage
toUserStorageController
- add
@metamask/accounts-controller
dev dependency - add
@metamask/keyring-api
dev dependency
- add infura OIDC identifier (#4654)
- define and export new types:
AuthenticationControllerGetStateAction
,AuthenticationControllerStateChangeEvent
,Events
(#4633) - SDK and controller support for
GET /api/v1/userstorage/:feature
endpoint (#4626)- add method
performGetStorageAllFeatureEntries
toUserStorageController
- add
ALLOW_ARBITRARY_KEYS
toUSER_STORAGE_SCHEMA
to allow wildcard/getAll for entries for a feature
- add method
- add subpath exports to
@metamask/profile-sync-controller
(#4604)- add
@metamask/profile-sync-controller/sdk
export - add
@metamask/profile-sync-controller/user-storage
export - add
@metamask/profile-sync-controller/auth
export
- add
- Bump
typescript
from~5.1.6
to~5.2.2
(#4584) - Fix controllers with missing or incorrect messenger action/event types (#4633)
- BREAKING:
AuthenticationControllerMessenger
must allow internal events defined in theEvents
type (#4633) AuthenticationControllerActions
is widened to include theAuthenticationController:getState
action (#4633)- Replaced
@metamask/profile-sync-controller/sdk
to use the same encryption file asUserStorageController
(#4649)
- update subpath exports internal
package.json
files to resolvejest-haste-map
errors (#4650)
- unlock checks for when controller methods are called (#4569)
- BREAKING made
MOCK_ENCRYPTED_STORAGE_DATA
fixture a function to be lazily evaluated (#4592) - Bump
typescript
from~5.0.4
to~5.1.6
(#4576)
- Add and export object
USER_STORAGE_SCHEMA
, functiongetFeatureAndKeyFromPath
, and typeUserStoragePath
(#4543) - Add
connectSnap
method to theJwtBearerAuth
class for connecting to snap after initializing the Profile Sync SDK (#4560)
- BREAKING: Enforce
UserStorageSchema
usage 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
entryKey
function parameter fromperformGetStorage
andperformSetStorage
methods ofUserStorageController
, and replace withpath
parameter of typeUserStoragePath
. - BREAKING: Remove
entryKey
function parameter fromcreateEntryPath
, and replace withpath
parameter of typeUserStoragePath
. - BREAKING: Remove
entryKey
property from typeUserStorageOptions
, and replace withpath
property of typeUserStoragePath
.
- BREAKING: Bump peerDependency
@metamask/snaps-controllers
from^8.1.1
to^9.3.0
(#3645) - Remove
@metamask/snaps-controllers
dependency #4556- This was listed under
peerDependencies
already, so it was redundant as a dependency.
- This was listed under
- Widen
isProfileSyncingEnabled
property of theUserStorageControllerState
type fromboolean
toboolean | null
(#4551) - Upgrade TypeScript version to
~5.0.4
and setmoduleResolution
option toNode16
(#3645) - Bump
@metamask/base-controller
from^6.0.1
to^6.0.2
(#4544) - Bump
@metamask/snaps-sdk
from^4.2.0
to^6.1.1
(#3645, #4547) - Add new dependency
@metamask/snaps-utils
(#3645, #4547)
- Remove object
USER_STORAGE_ENTRIES
and typeUserStorageEntryKeys
(#4543)
-
added
LoginResponse
validation 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
getMetaMetricsId
interface to support async calls to metametrics ID (#4477)
- export
defaultState
forAuthenticationController
andUserStorageController
. (#4441)
AuthType
,Env
,Platform
are changed from const enums to enums (#4441)
- Initial release