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/keyring-sdkfrom^2.0.2to^2.2.0(#544, #546, #562) - Bump
@metamask/keyring-utilsfrom^3.2.0to^3.3.1(#544, #546) - Bump
@metamask/keyring-apifrom^23.1.0to^23.5.0(#562, #569, #583, #587) - Bump
@metamask/superstructfrom^3.3.0to^3.4.0(#577)
- Bump
@metamask/keyring-apifrom^23.0.1to^23.1.0(#538) - Bump
@metamask/keyring-sdkfrom^2.0.1to^2.0.2(#538)
- Expose same getters in
HdKeyring(v2 keyring wrapper from/v2) (#529)- We need this as some consumers were already using those getters when using the v1 keyring.
- Bump
@metamask/account-apifrom^1.0.2to^1.0.3(#518) - Bump
@metamask/keyring-apifrom^23.0.0to^23.0.1(#518) - Bump
@metamask/keyring-sdkfrom^2.0.0to^2.0.1(#518)
- Workaround Browserify subpath export for
/v2(#516)
- Add
./v2subpath export for keyring v2 implementation (#513)HdKeyringandHdKeyringOptionsare now available from@metamask/eth-hd-keyring/v2.
- BREAKING: Move and rename
HdKeyringV2andHdKeyringV2Optionsto the new./v2subpath export (#513)HdKeyringV2is nowHdKeyringfrom@metamask/eth-hd-keyring/v2.HdKeyringV2Optionsis nowHdKeyringOptionsfrom@metamask/eth-hd-keyring/v2.
- Bump
@metamask/utilsfrom^11.10.0to^11.11.0(#483) - Bump
@metamask/account-apifrom^1.0.1to^1.0.2(#515) - Bump
@metamask/keyring-apifrom^22.0.0to^23.0.0(#515) - Bump
@metamask/keyring-sdkfrom^1.2.0to^2.0.0(#515)
- Add new dependency
@metamask/keyring-sdk@1.2.0(#478, #482, #496, #509)- This package now contains the keyring v2 wrapper helpers (
EthKeyringWrapper,EthKeyringMethod). - The account ID (generated by
KeyringAccountRegistry) are now deterministic for EVM addresses.
- This package now contains the keyring v2 wrapper helpers (
- Bump
@metamask/keyring-apifrom^21.6.0to^22.0.0(#482) - Bump
@metamask/account-apifrom^1.0.0to^1.0.1(#487) - Bump
@metamask/utilsfrom^11.1.0to^11.10.0(#489)
- Add
HdKeyringV2class implementingKeyringV2interface (#398, #402, #404, #410, #413, #451, #453)- Wraps legacy
HdKeyringto expose accounts via the unifiedKeyringV2API and theKeyringAccounttype. - Extends
EthKeyringWrapperfor common Ethereum logic.
- Wraps legacy
- Enforce mnemonics validation (#450)
- Validates mnemonics against BIP39 specification (word count, wordlist, checksum) before use.
- Throws for invalid mnemonics.
- Export types
SerializedHDKeyringStateandDeserializableHDKeyringState(#255)
- BREAKING: The method signature for
signTypedDatahas been changed (#224)- The method now accepts a
TypedDataV1object whenSignTypedDataVersion.V1is passed in the options, andTypedMessage<Types>when other versions are requested.
- The method now accepts a
- BREAKING: The
HdKeyringclass now extendsKeyringfrom@metamask/keyring-utils(#255)- The
deserializemethod does not acceptBuffermnemonic anymore - The options argument to
deserializeis no longer optional getAccountsis nowasync
- The
- Switched to using a
Mapfor wallet storage (#374)- Improves performance of account lookup and removal to constant time
- Cache derived account addresses (#373)
- Avoids recomputing addresses from public keys on every
getAccounts()call
- Avoids recomputing addresses from public keys on every
- BREAKING:
HDKeyringStatetype is no longer exported (#255)- This has effectively been replaced with
SerializedHDKeyringStateandDeserializableHDKeyringState
- This has effectively been replaced with
- Store mnemonic seed in
HdKeyring.seed(#244)
- BREAKING: The method
signTransactioncan now returns various type of transactions (#209)- Initially was supporting:
Transaction | AccessListEIP2930Transaction | FeeMarketEIP1559Transaction(types from@ethereumjs/tx). - Now also supports
BlobEIP4844Transaction | EOACodeEIP7702Transaction(types from@ethereumjs/tx).
- Initially was supporting:
- BREAKING: Bump
@ethereumjs/txfrom^4.2.0to^5.4.0(#209) - BREAKING: Bump
@ethereumjs/utilfrom^8.1.0to^9.1.0(#209)
- BREAKING: The
HdKeyringis not exported as default anymore (#161)
- Use
ts-bridge/cli@0.6.3(#214)- This new version fixes a bug regarding some missing exports.
- Add
signEip7702Authorizationmethod (#182)
- BREAKING: Added types to
HdKeyring(#166)- All methods on
HdKeyringretain their existing signatures, but now have types.
- All methods on
- Bump
@metamask/eth-sig-utildependency from^8.0.0to8.2.0(#177, #134) - Bump
@metamask/utilsdependency from^9.3.1to11.1.0(#134, #167)
- Use
ts-bridge/cli@0.6.1(#118)- This new version fixes a bug with CJS re-exports.
- BREAKING: Move seed generation to deserialization (#100)
- Using the constructor directly no longer generates the seed required for account derivation.
- Both
serializeanddeserializeare now properasyncmethods.
- Allow passing native custom cryptographic functions (#102)
- The seed generation is now relying
@metamask/key-treepackage (instead of@metamask/scure-bip39). - The
constructornow allows a new optioncryptographicFunctionswhich allows the use of custom cryptographic functions during seed generation.
- The seed generation is now relying
- BREAKING: Bump
@metamask/eth-sig-utildependency from^7.0.3to^8.0.0(#79)signTypedDatano longer supportnumberfor addresses, see here.
- Convert to monorepo
- Package name does not change (
@metamask/eth-hd-keyring) and sources have been moved to:packages/keyring-eth-hd. - You can find all the changes here.
- Package name does not change (
- BREAKING: Update minimum Node.js version from v14 to v16 (#98)
- Bump dependencies (#99)
- BREAKING:
@metamask/eth-sig-utilfrom^6.0.0to^7.0.0 - BREAKING:
@metamask/utilsfrom^5.0.2to^8.1.0 @ethereumjs/txfrom^4.1.1to^4.2.0@ethereumjs/utilfrom8.0.5to^8.1.0ethereum-cryptographyfrom^1.2.0to^2.1.2
- BREAKING:
7.0.0 [RETRACTED]
- This version was retracted due to a bug causing code to be missing from published package.
- Bump dependencies (#94)
@ethereumjs/utilfrom^8.0.2to^8.1.0@metamask/eth-sig-utilfrom^5.0.2to^6.0.0@metamask/scure-bip39from^2.0.3to^2.1.0@metamask/utilsfrom^5.0.0to^5.0.2ethereum-cryptographyfrom^1.1.2to^1.2.0
6.0.1 [RETRACTED]
- This version was retracted due to a bug causing code to be missing from published package.
- Revert mnemonic serialization format from
Record<number, number>(i.e. a stringifiedUint8Array) which was introduced in v5.0.0 back to an untyped array of utf8 encoded bytes, which was the format prior to v5.0.0 (#81)
5.0.1 [DEPRECATED]
- Remove prepack script and references in order to fix publish release flow (#77)
5.0.0 [DEPRECATED]
- BREAKING: Update minimum Node.js version from v12 to v14 (#67)
- BREAKING: Makes version-specific
signTypedDatamethods private (#71)- Consumers should use the generic
signTypedDatamethod and pass the version they'd like as a property in the options argument.
- Consumers should use the generic
- BREAKING: Makes the
walletsproperty private (#71)- Consumers should not use this property as it is intended for internal use only.
- BREAKING: Makes
getPrivateKeyFora private method (#71)- Consumers who wish to get the private key for a given account should use the
exportAccountmethod.
- Consumers who wish to get the private key for a given account should use the
- BREAKING: Bumps browser requirements to those with ES2020 support or greater (#70)
- This change is introduced in update of
@metamask/eth-sig-utilto v5 and new direct dependency onethereumjs/utilv8.0.2
- This change is introduced in update of
- Replaces use of
ethereumjs-walletimplementation of hdkey with one fromethereum-cryptographyand adapts accordingly. (#69) - Replaces
@metamask/bip39with@metamask/scure-bip39(#67)
- BREAKING: Remove redundant
newGethSignMessagemethod (#71)- Consumers can use
signPersonalMessagemethod as a replacement for newGethSignMessage.
- Consumers can use
- BREAKING:
HDKeyringno longer extendsEventEmitter, so noEventEmittermethods are available on this class (#70) - Removes
ethereumjs-utildependency. (#67)
- Add parameter validation for constructor /
deserializemethod (#65)- As of v4.0.0, the
deserializemethod (which is also called by the constructor) can no longer generate accounts with thenumberOfAccountsoption without amnemonic. Prior to v4.0.0, a mnemonic was generated automatically if it was missing, but we now want to ensure a mnemonic is never implicitly generated without the caller knowing.
- As of v4.0.0, the
- Add tests to get coverage to 100% (#62)
- Fix bug where an unexpected error would occur if the mnemonic passed to
_initFromMnemonicwas a buffer array (#62)
- BREAKING: Do not allow re-initialization of keyring instance (#55)
- Consumers are now required to call generateRandomMnemonic() after initialization for creating new SRPs.
- BREAKING: Update minimum Node.js version from v10 to v12 (#45)
- Add
@lavamoat/allow-scripts(#47)- We now have an allowlist for all post-install scripts. The standard setup script has been added, along with new contributor documentation in the README to explain this script.
- Obfuscate serialized mnemonic (#59)
- Class variable
mnemoniconHdKeyringcan now be either typeBufferor typestring. - Deserialize method (and
HdKeyringconstructor by extension) can no longer be passed an options object containing a value fornumberOfAccountsif it is not also containing a value formnemonic.
- Class variable
- Package name changed from
eth-hd-keyringto@metamask/eth-hd-keyring.