This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
Releases: MetaMask/KeyringController
Releases · MetaMask/KeyringController
12.0.0
Changed
- BREAKING: Update
@metamask/eth-sig-util
to version^6
(#235)signPersonalMessage
now normalizesmsgParams.data
in a different way for0
and empty strings inputs.0
will be normalized to0x00
and empty strings to0x
- BREAKING: Update Node.js min version to 16.0.0 (#236)
- Update
@metamask/utils
package (#234) - Destroy keyrings on reference drop (#233)
11.0.0
Changed
- BREAKING: The addNewKeyring method now expects an object containing the property
privateKeys
of typestring[]
in case the supplied keyring is a "Simple Keyring". (#202), (#228) - Migrate the project to TypeScript (#202)
- Methods that started with an underscore are now
#
private methods - Additional validation has been added to most methods
- Methods that started with an underscore are now
- deps: Unpin and bump @metamask/[email protected]>^5.1.0 (#224)
10.0.1
10.0.0
Changed
- BREAKING: Update module name to use
@metamask
scope (#187)- Consumers will now need to import this package as
@metamask/eth-keyring-controller
- Consumers will now need to import this package as
- BREAKING: @metamask/eth-hd-keyring to v6.0.0 (#193)
- Reverts the serialization format of mnemonics on HDKeyrings from
Uint8Arrays
back to an untyped array of UTF8 encoded bytes, which was the format prior to v9.0.0 of this package.
- Reverts the serialization format of mnemonics on HDKeyrings from
9.0.0
Added
- Add support for keyring
init
method (#163).- If a keyring has an
init
method, it will be called automatically upon construction. It is called withawait
, so it can be asynchronous.
- If a keyring has an
Changed
- BREAKING: Replace constructor option and public property
keyringTypes
withkeyringBuilders
(#163).- The constructor now takes keyring builder functions rather than classes. Each builder function should return a keyring instance when called, and it must have a
type
string property set to the keyring type name. See the newly exportedkeyringBuilderFactory
function for an example. The builder functions must be synchronous; use aninit
method for asynchronous initialization steps.
- The constructor now takes keyring builder functions rather than classes. Each builder function should return a keyring instance when called, and it must have a
- BREAKING:
KeyringController
is now a named export instead of a default export (#163). - BREAKING: Update
@metamask/eth-simple-keyring
from v4 to v5 (#171).- This keyring type is included as a default. If you are using this keyring API directly, see the
@metamask/eth-simple-keyring
release notes for details on required changes.
- This keyring type is included as a default. If you are using this keyring API directly, see the
- BREAKING: Replace
getKeyringClassForType
method withgetKeyringBuilderForType
(#163). - BREAKING: Update
@metamask/eth-hd-keyring
to v5 (#177)- This keyring type is included as a default. If you are using this keyring API directly, see the
@metamask/eth-hd-keyring
release notes for details on required changes.
- This keyring type is included as a default. If you are using this keyring API directly, see the
- BREAKING: Require support for ES2020 (#177, #180)
- As a result of some dependency updates made in this release, this package now requires ES2020 support. If using this package in an environment that does not support ES2020 completely, consider investigating these two dependency changes and transpiling any packages using ES2020 syntax.
- Update
@metamask/eth-sig-util
to v5 (#180) - Update minimum supported version of
@metamask/browser-passworder
from v4.0.1 to v4.0.2 (#182) - Remove
bip39
dependency (#179)
Fixed
- Fix support for asynchronous
addAccounts
HD Keyring method (#176)- This method was asynchronous, but was called synchronously. Currently the method does not do anything asychronous so this should have no functional impact, but this ensures any future errors or asynchronous steps added to that method work correctly in the future.
8.1.0
8.0.1
Fixed
- Restore full state return value (#161)
- Some methods were accidentally changed in v8.0.0 to return nothing, where previously they returned the full KeyringController state.
- The affected methods were:
createNewVaultAndKeychain
submitPassword
submitEncryptionKey
addNewAccount
removeAccount
- They now all return the full state, just as they did in earlier versions.
8.0.0
Added
- Allow login with encryption key rather than password (#152)
- This is required to support MetaMask extension builds using manifest v3.
- This is enabled via the option
cacheEncryptionKey
. - The encryption key and salt have been added to the
memStore
asencryptionKey
andencryptionSalt
. The salt is used to verify that the key matches the vault being decrypted. - If the
cacheEncryptionKey
option is enabled, the encryption key and salt get cached in thememStore
whenever the password is submitted. - The encryption key can be submitted with the new method
submitEncryptionKey
. - The
unlockKeyrings
method now accepts additional parameters for the encryption key and salt, though we don't recommend using this method directly.
Changed
- BREAKING: Update minimum Node.js version to v14 (#146)
- BREAKING:: Remove password parameter from
persistAllKeyrings
andcreateFirstKeyTree
(#154)- The password or encryption key must now be set already before these method are called. It is set by
createNewVaultAndKeychain
,createNewVaultAndRestore
, andsubmitPassword
/submitEncryptionKey
. - This change was made to reduce redundant state changes.
- The password or encryption key must now be set already before these method are called. It is set by
Fixed
- Fix a typo in the duplicate account import error (#153)
v7.0.2
v7.0.1
Fixed
- Fix breaking change in
addNewKeyring
function that was accidentally introduced in v7.0.0 (#136)- We updated the method such that keyrings were always constructed with constructor arguments, defaulting to an empty object if none were provided. But some keyrings (such as the QR Keyring) relied upon the options being undefined in some cases.