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-apifrom^23.0.1to^23.1.0(#538) - Bump
@metamask/keyring-sdkfrom^2.0.1to^2.0.2(#538)
- 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)LedgerKeyringandLedgerKeyringOptionsare now available from@metamask/eth-ledger-bridge-keyring/v2.
- BREAKING: Move and rename
LedgerKeyringV2andLedgerKeyringV2Optionsto the new./v2subpath export (#513)LedgerKeyringV2is nowLedgerKeyringfrom@metamask/eth-ledger-bridge-keyring/v2.LedgerKeyringV2Optionsis nowLedgerKeyringOptionsfrom@metamask/eth-ledger-bridge-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 dynamic NFT and ERC-20 check (#506)
- Add
getTransactionSelectorto read the 4-byte calldata selector from serialized transaction hex (legacy and typed txs) (#506)- Ledger mobile bridge passes
nft: truetoclearSignTransactionwhen that selector is NFT-only (ERC-721 / ERC-1155).
- Ledger mobile bridge passes
- Add
ERC20_WRITE_SELECTORSfor the three EIP-20 write functions (transfer,transferFrom,approve) (#506)
- Add new dependency
@metamask/keyring-sdk@1.2.0(#478), (#482), (#496), (#509)- This package now contains the keyring v2 wrapper helpers (
EthKeyringWrapper). - The account ID (generated by
KeyringAccountRegistry) are now deterministic for EVM addresses.
- This package now contains the keyring v2 wrapper helpers (
- Bump
@metamask/hw-wallet-sdkfrom^0.6.0to^0.8.0(#482), (#497) - Bump
@metamask/keyring-apifrom^21.6.0to^22.0.0(#482) - Bump
@metamask/account-apifrom^1.0.0to^1.0.1(#487)
- Integrate
@metamask/hw-wallet-sdkfor standardized hardware wallet error handling (#446)- Replace custom error handling with
HardwareWalletErrorfrom the SDK. - Use
LEDGER_ERROR_MAPPINGSfrom the SDK for consistent error code mapping. - Re-export
HardwareWalletError,ErrorCode,Severity,Category, and error mappings for consumer convenience. - Deprecate
LedgerStatusErrorin favor ofHardwareWalletError. - Prefix Ledger transport error messages for compatibility.
- Replace custom error handling with
- Add
LedgerKeyringV2class implementingKeyringV2interface (#416), (#451), (#453)- Wraps legacy
LedgerKeyringto expose accounts via the unifiedKeyringV2API and theKeyringAccounttype. - Extends
EthKeyringWrapperfor common Ethereum logic.
- Wraps legacy
- Normalize signature
vvalue from Ledger devices for proper recovery (#449)
- Increase ledger iframe timeout interval (#314)
- Refactor error handling around
TransportStatusError(#301)
- Better error handling for Ledger signing operations (#294)
- Removed timeout for messages requiring user actions (#279)
- Increase timeout for user action requests (#275)
- Fix use of
saltvalue as astringforsignTypedData<V4>(#249) - Use timeouts for Ledger iframe messages (#271)
- BREAKING: The
signTypedDatamethod now requiresSignTypedDataVersion.V4as version for theoptionsargument (#224)
- Trim
0xprefix forsignTransaction(#253)- This regression was due to latest
@ethereumjsupgrade.
- This regression was due to latest
- 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:
LedgerKeyringnow implements theKeyringtype (#194)- The class does not extend
EventEmitteranymore. - The
LedgerKeyring.accountsclass variable is now areadonly Hex[]array. - The
addAccountsmethod signature has been changed:- An
amountnumber parameter is now required to specify the number of accounts to add. - The method now returns a promise resolving to an array of
Hexaddresses.
- An
- The
unlockmethod now returnsPromise<Hex>. - The
getAccountsmethod now returnsPromise<Hex[]>. - The
deserializemethod now requires aLedgerKeyringSerializedStatetyped parameter. - The
signTransactionmethod now accepts anHextyped value as theaddressparameter. - The
signMessagemethod now accepts anHextyped value as thewithAccountparameter. - The
signPersonalMessagemethod now accepts anHextyped value as thewithAccountparameter. - The
signTypedDatamethod now accepts anHextyped value as thewithAccountparameter. - The
unlockAccountByAddressmethod now accepts anHextyped value as theaddressparameter.
- The class does not extend
- BREAKING: The
exportAccountmethod has been removed (#194)
- Use
ts-bridge/cli@0.6.3(#214)- This new version fixes a bug regarding some missing exports.
- Bump
@metamask/eth-sig-utildependency from^8.0.0to8.2.0(#177), (#134) - Bump
@metamask/utilsdependency from^9.3.1to11.1.0(#134), (#167)
- Bump
@ledgerhq/hw-app-ethdependency from^6.39.0to^6.42.0(#153)- Required to fix handling of EIP-712 content.
- Bump
@metamask/eth-sig-utildependency from^8.0.0to^8.1.2(#134)
- Fix webpack build about non-exported
EIP712Messagetype (#140)
- Use
ts-bridge/cli@0.6.1(#118)- This new version fixes a bug with CJS re-exports.
- BREAKING: Enable Ledger clear signing (#99)
- The
LedgerSignTypedDataParamstype now requires a newmessagefield which replaces thedomainSeparatorHexandhashStructMessage}Hexfields.
- The
- BREAKING: Add ESM build (#40)
- It's no longer possible to import files from
./distdirectly.
- It's no longer possible to import files from
- BREAKING: Bump
@metamask/eth-sig-utildependency from^7.0.3to^8.0.0(#79)signTypedDatano longer supportnumberfor addresses, see here.
- Device ID will now be cleared up when forgetting a device (#86)
- Bump
@ledgerhq/hw-app-ethdependency to^6.39.0(#68)- This new dependency version reduces the resulting package bundle size.
- BREAKING:
addAccountswill now only return newly created accounts (#63)- This keyring was initially returning every accounts (previous and new ones), which is different from what is expected in the [
Keyringinterface].(https://github.com/MetaMask/utils/blob/v9.2.1/src/keyring.ts#L65)
- This keyring was initially returning every accounts (previous and new ones), which is different from what is expected in the [
- Convert to monorepo
- Package name does not change (
@metamask/eth-ledger-bridge-keyring) and sources have been moved to:packages/keyring-eth-ledger-bridge. - You can find all the changes here.
- Package name does not change (
- The promise returned by the
initmethod now resolves only after iframe has been loaded (#236)updateTransportMethodwill throw an error when called beforeinit
- Refactor error message in
LedgerKeyring(#232) - Extend
LedgerMobileBridgetype fromLedgerBridge(#233) - Create new
MetaMaskLedgerHwAppEthinstance instead of re-using previous instance (#231)
- Add classes
LedgerMobileBridge,LedgerTransportMiddleware, andMetaMaskLedgerHwAppEthto support Bluetooth as a HW Ledger Transport option (#225)
- BREAKING: The
LedgerKeyringmethodsetAccountToUnlocknow only accepts an input of typenumber(#225) - BREAKING: Removed the
chainCodeproperty from theGetPublicKeyResponsetype (#225)
- Add
getOptionsandsetOptionsmethods toLedgerBridgeinterface (#210)
- BREAKING:
LedgerIframeBridgeclass constructor now takes an options object withbridgeUrl(#210) - BREAKING:
LedgerBridgeinitfunction now takes no parameters (#210) - BREAKING:
LedgerBridgeKeyringOptionsno longer containbridgeUrl(#210) - BREAKING:
LedgerBridgeinterface is now parameterized over its option type (#210) - Minor performance enhancement (#211)
- BREAKING:
IFrameMessageResponsenow has more restrictive typings (#207) (#207)
- Fix
invalid rlp dataerror for legacy transactions in2.0.0(#212)
- BREAKING: Remove support for major node versions 14,15,17,19. Minimum Node.js version is now 16. (#204)
- Bump
@metamask/eth-sig-utilfrom^6.0.1to^7.0.0(#205)
- Move
@metamask/utilsfrom deendencies to devDependencies (#209)
- Bump dependency
hdkeyfrom0.8.0to^2.1.0(#196) - Replace dependency
eth-sig-util@^2with@metamask/eth-sig-util@^6(#157) - Replace dependency
ethereumjs-util@^7.0.9with@ethereumjs/util@^8.0.0and@ethereumjs/rlp(#153)
- BREAKING: Separate the bridge from the keyring (#156)
- The Ledger bridge is now a separate class (
LedgerIframeBridge), which must be constructed separately from the keyring and passed in as a constructor argument. - The bridge initialization has been moved from the keyring constructor to the keyring
initmethod. The bridge is expected to be passed to the keyring uninitialized, and the keyringinitmethod is expected to be called after keyring construction (before the keyring is used). - The keyring constructor no longer accepts keyring state. Instead, any pre-existing keyring state should be passed to the
deserializemethod after construction.
- The Ledger bridge is now a separate class (
- BREAKING: Export changed from default to named (#174)
- The keyring is exported as
LedgerKeyring
- The keyring is exported as
- Add TypeScript types (#174)
- BREAKING: @ethereumjs/tx upgraded to major version 4, which includes a shift from storing numerical values as BNs to storing them as native BigInts. This is a breaking change for users of this keyring who access the values of the tx object, or that use those tx objects to interact with other libraries that depend on @ethereumsjs/tx versions under 4.0.0. (#181)
- BREAKING: The minimum version of Node.js required for this package has been bumped to v14. (#169)
- Fix incorrect
vfor EIP-712 signatures andpersonal_sign(#152)
- hdk.publicKey and hdk.chainCode should not be updated when unlocking using hdPath for an account. (#146)
- Add a new
destroymethod which will remove themessageevent listener from window. (#145)
- Add a new
isConnectedmethod which allows determining if the device is last known to be connected. (#131)
- Messaging now runs off of message IDs instead of assuming the response received is from the last message sent, which will not always been true. (#132)
- Add a new
attemptMakeAppmethod which allows clients to attempt a creation of the Ledger transport for the purposes of detecting/catching potential connection errors. (#126)
updateTransportMethodno longer defaults its parameter to false, and now names the param sent with the'ledger-update-transport'messagetransportType. This better is to support the use of an enum, instead of a boolean, for specifying transport preferences. (#114)
- Allow ledger-bridge iframe to connect Ledger wia WebHID, when it is supported by the current browser (#107)
- Reject with an Error object if unlocking is not successful (#104)
- Ensure that logs of errors only have a single
Error:string in the message (#105)
- Remove unused
eventsandethereumjs-txdependencies (#101), (#102) - Update eth-ledger-bridge-keyring to support EIP-1559 transactions (#98), (#97), (#96)
- Support new versions of ethereumjs/tx (#68)