Skip to content

Latest commit

 

History

History
497 lines (342 loc) · 26.9 KB

CHANGELOG.md

File metadata and controls

497 lines (342 loc) · 26.9 KB

Changelog

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.

Changed

  • Bump @metamask/utils to ^11.0.1 and @metamask/rpc-errors to ^7.0.2 (#5080)
  • Bump @metamask/keyring-controller from 19.0.1 to 19.0.2 (#5058)
  • Bump @metamask/network-controller from 22.1.0 to ^22.1.1 (#5038)
  • Bump @metamask/base-controller from ^7.0.0 to ^7.1.0 (#5079)

Fixed

  • Align signature request and message params ID (#5102)

Changed

  • fix: Fixes in signature decoding functionality (#5028)
  • fix: signature decoding api should be called for typed sign V3 also (#5033)
  • fix: Revert eth-sig-util package (#5027)
  • fix: Update jsonschema version & eth-sig-util (#4998)

Changed

  • Bump @metamask/controller-utils from ^11.4.3 to ^11.4.4 (#5012)

Fixed

  • Correct ESM-compatible build so that imports of the following packages that re-export other modules via export * are no longer corrupted: (#5011)
    • @metamask/eth-sig-util

Changed

  • BREAKING: Bump @metamask/keyring-controller peer dependency from ^18.0.0 to ^19.0.0 (#4195)

Changed

  • BREAKING: Bump @metamask/keyring-controller peer dependency from ^17.0.0 to ^18.0.0 (#4915)
  • Bump @metamask/controller-utils from ^11.4.2 to ^11.4.3 (#4915)

Added

  • Add isDecodeSignatureRequestEnabled constructor callback to determine if decoding API should be used (#4903)
  • Add decodingApiUrl constructor property to specify URL of API to provide additional decoding data. (#4855)

Added

  • Add chainId and networkClientId to SignatureRequest and LegacyStateMessage types (#4797)
  • Add networkClientId to OriginalRequest type (#4797)

Changed

  • BREAKING: Make request argument required in newUnsignedPersonalMessage and newUnsignedTypedMessage methods (#4797)
  • Throw if no networkClientId in request or if chain ID cannot be determined (#4797)
  • Bump @metamask/approval-controller from ^7.1.0 to ^7.1.1 (#4862)
  • Bump @metamask/controller-utils from ^11.4.0 to ^11.4.1 (#4862)
  • Bump @metamask/base-controller from 7.0.1 to ^7.0.2 (#4862)
  • Bump @metamask/utils from ^9.1.0 to ^10.0.0 (#4831)
  • Bump @metamask/controller-utils from ^11.3.0 to ^11.4.0 (#4834)

Removed

  • Remove getCurrentChainId and getAllState callbacks from constructor options (#4797)

Added

  • Add additional properties to message parameter types (#4822)
    • Add metamaskId to MessageParams.
    • Add version to MessageParamsTyped.

Changed

  • Update required arguments in methods (#4822)
    • Make request argument optional in newUnsignedPersonalMessage and newUnsignedTypedMessage.
    • Make signingOptions argument optional in newUnsignedTypedMessage.
  • Bump eth-sig-util from ^7.0.1 to ^8.0.0 (#4830)
  • Bump @metamask/keyring-controller from ^17.2.2 to ^17.3.0 (#4643)

Added

  • Remove usage of @metamask/message-manager package (#4785)
    • Add signatureRequests object to state to include all messages with all types and statuses.
    • Add optional state option to constructor to provide initial state.
    • Add equivalent types formerly in @metamask/message-manager:
      • OriginalRequest
      • TypedSigningOptions
      • MessageParams
      • MessageParamsPersonal
      • MessageParamsTyped
      • SignatureRequest
      • SignatureRequestStatus
      • SignatureRequestType

Changed

  • Remove usage of @metamask/message-manager package (#4785)
    • BREAKING Change type property in message state to enum values rather than string.
    • Deprecate the following state since the same data can be derived from signatureRequests:
      • unapprovedPersonalMsgs
      • unapprovedTypedMessages
      • unapprovedPersonalMsgCount
      • unapprovedTypedMessagesCount
    • Deprecate the following properties since the same data can be derived from the state:
      • unapprovedPersonalMessagesCount
      • unapprovedTypedMessagesCount
      • messages
    • Deprecate the following constructor options since they are no longer used:
      • getAllState
      • securityProviderRequest

Added

  • Add initial tracing to SignatureController (#4655)
    • Adds an optional trace callback to the constructor, and an optional traceContext option to the newUnsignedTypedMessage and newUnsignedPersonalMessage methods.

Fixed

  • 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 in package.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.
  • 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.

Changed

  • BREAKING: Bump dependency and peerDependency @metamask/logging-controller from ^5.0.0 to ^6.0.0 (#4643)
  • Bump @metamask/base-controller from ^6.0.2 to ^7.0.0 (#4625, #4643)
  • Bump @metamask/message-manager from ^10.0.2 to ^10.0.3 (#4643)
  • Bump typescript from ~5.0.4 to ~5.2.2 (#4576, #4584)

Changed

  • Throw exact error provided by client on rejection (#4610)
  • Upgrade TypeScript version to ~5.2.2 (#4584)
  • Upgrade TypeScript version to ~5.1.6 (#4576)

Removed

  • Remove @metamask/rpc-errors dependency (#4610)

Changed

  • Remove @metamask/approval-controller, @metamask/keyring-controller, and @metamask/logging-controller dependencies #4556
    • These were listed under peerDependencies already, so they were redundant as dependencies.
  • Upgrade TypeScript version to ~5.0.4 and set moduleResolution option to Node16 (#3645)
  • Bump @metamask/base-controller from ^6.0.0 to ^6.0.2 (#4517, #4544)
  • Bump @metamask/controller-utils from ^11.0.0 to ^11.0.2 (#4517, #4544)
  • Bump @metamask/message-manager from ^10.0.0 to ^10.0.2 (#4527, (#4548)[#4548])
  • Bump @metamask/rpc-errors from ^6.2.1 to ^6.3.1 (#4516)
  • Bump @metamask/utils from ^8.3.0 to ^9.1.0 (#4516, #4529)

Changed

  • BREAKING: Bump minimum Node version to 18.18 (#3611)
  • BREAKING: Bump dependency and peer dependency @metamask/approval-controller to ^7.0.0 (#4352)
  • BREAKING: Bump dependency and peer dependency @metamask/keyring-controller to ^17.0.0 (#4352)
  • BREAKING: Bump dependency and peer dependency @metamask/logging-controller to ^5.0.0 (#4352)
  • Bump @metamask/base-controller to ^6.0.0 (#4352)
  • Bump @metamask/controller-utils to ^11.0.0 (#4352)
  • Bump @metamask/message-manager to ^10.0.0 (#4352)

Changed

  • BREAKING: Update messages getter to return Record<string, PersonalMessage | TypedMessage> instead of Record<string, Message | PersonalMessage | TypedMessage> (#4319)
  • BREAKING Bump @metamask/keyring-controller peer dependency to ^16.1.0 (#4342)
  • BREAKING Bump @metamask/logging-controller peer dependency to ^4.0.0 (#4342)
  • Bump @metamask/controller-utils to ^10.0.0 (#4342)
  • Bump @metamask/message-manager to ^9.0.0 (#4342)

Removed

  • BREAKING: Remove state properties unapprovedMsgs and unapprovedMsgCount (#4319)
    • These properties were related to handling of the eth_sign RPC method, but support for that is being removed, so these are no longer needed.
  • BREAKING: Remove isEthSignEnabled option from constructor (#4319)
    • This option governed whether handling of the eth_sign RPC method was enabled, but support for that method is being removed, so this is no longer needed.
  • BREAKING: Remove newUnsignedMessage method (#4319)
    • This method was called when a dapp used the eth_sign RPC method, but support for that method is being removed, so this is no longer needed.

Changed

  • BREAKING Bump @metamask/keyring-controller peer dependency to ^16.0.0 (#4234)
  • Bump @metamask/base-controller to ^5.0.2 (#4232)
  • Bump @metamask/approval-controller to ^6.0.2 (#4234)
  • Bump @metamask/message-manager to ^8.0.2 (#4234)

Changed

  • BREAKING Bump peer dependency on @metamask/keyring-controller to ^15.0.0 (#4090)

Fixed

  • Fix types field in package.json (#4047)

Added

  • BREAKING: Add ESM build (#3998)
    • It's no longer possible to import files from ./dist directly.

Changed

  • BREAKING: Bump dependency and peer dependency on @metamask/approval-controller to ^6.0.0 (#4039)
  • BREAKING: Bump @metamask/base-controller to ^5.0.0 (#4039)
    • This version has a number of breaking changes. See the changelog for more.
  • BREAKING: Bump dependency and peer dependency on @metamask/keyring-controller to ^14.0.0 (#4039)
  • BREAKING: Bump dependency and peer dependency on @metamask/logging-controller to ^3.0.0 (#4039)
  • Bump @metamask/controller-utils to ^9.0.0 (#4039)
  • Bump @metamask/message-manager to ^8.0.0 (#4039)

Changed

  • BREAKING: Bump @metamask/keyring-controller dependency and peer dependency to ^13.0.0 (#4007)
  • Bump @metamask/approval-controller to ^5.1.3 (#4007)
  • Bump @metamask/controller-utils to ^8.0.4 (#4007)
  • Bump @metamask/logging-controller to ^2.0.3 (#4007)
  • Bump @metamask/message-manager to ^7.3.9 (#4007)
  • Bump @metamask/rpc-errors to ^6.2.1 (#3954)
  • Remove dependency ethereumjs-util (#3943)

Changed

  • BREAKING: Bump @metamask/approval-controller peer dependency to ^5.1.2 (#3821)
  • BREAKING: Bump @metamask/keyring-controller peer dependency to ^12.2.0 (#3821)
  • BREAKING: Bump @metamask/logging-controller peer dependency to ^2.0.2 (#3821)
  • Bump @metamask/base-controller to ^4.1.1 (#3821)
  • Bump @metamask/controller-utils to ^8.0.2 (#3821)
  • Bump @metamask/message-manager to ^7.3.8 (#3821)

Changed

  • BREAKING: Bump @metamask/keyring-controller to ^12.1.0
  • Bump @metamask/utils to ^8.3.0 (#3769)

Fixed

  • Fix stateChange subscriptions with selectors (#3702)

Changed

  • BREAKING: Bump @metamask/keyring-controller to ^12.0.0

Changed

  • BREAKING: Bump @metamask/approval-controller dependency and peer dependency from ^5.0.0 to ^5.1.1 (#3695, #3680)
  • BREAKING: Bump @metamask/keyring-controller dependency and peer dependency from ^10.0.0 to ^11.0.0 (#3695)
  • BREAKING: Bump @metamask/logging-controller dependency and peer dependency from ^2.0.0 to ^2.0.1 (#3695)
  • Bump @metamask/base-controller to ^4.0.1 (#3695)
  • Bump @metamask/controller-utils to ^8.0.1 (#3695, #3678, #3667, #3580)
  • Bump @metamask/message-manager to ^7.3.7 (#3695)

Changed

  • BREAKING: Bump @metamask/base-controller to ^4.0.0 (#2063)
    • This is breaking because the type of the messenger has backward-incompatible changes. See the changelog for this package for more.
  • Bump @metamask/approval-controller to ^5.0.0 (#2063)
  • Bump @metamask/controller-utils to ^6.0.0 (#2063)
  • Bump @metamask/keyring-controller to ^10.0.0 (#2063)
  • Bump @metamask/logging-controller to ^2.0.0 (#2063)
  • Bump @metamask/message-manager to ^7.3.6 (#2063)

Changed

  • BREAKING: Add @metamask/keyring-controller as a dependency and peer dependency
    • This was relied upon by past versions, but this was not reflected in the package manifest until now
  • Bump @metamask/utils from 8.1.0 to 8.2.0 (#1957)

Changed

  • Move from eth-rpc-errors ^4.0.2 to @metamask/rpc-errors ^6.1.0 (#1653)
  • Bump dependency and peer dependency on @metamask/approval-controller to ^4.0.1
  • Bump dependency and peer dependency on @metamask/logging-controller to ^1.0.4

Changed

  • Bump dependency on @metamask/utils to ^8.1.0 (#1639)
  • Bump dependency and peer dependency on @metamask/approval-controller to ^4.0.0
  • Bump dependency on @metamask/base-controller to ^3.2.3
  • Bump dependency on @metamask/controller-utils to 5.0.2
  • Bump dependency on @metamask/message-manager to ^7.3.5

Changed

  • Update TypeScript to v4.8.x (#1718)

Changed

  • Add LoggingController logs on signature operation stages (#1692)
  • Bump dependency on @metamask/controller-utils to ^5.0.0
  • Bump dependency on @metamask/keyring-controller to ^8.0.0
  • Bump dependency on @metamask/logging-controller to ^1.0.2
  • Bump dependency on @metamask/message-manager to ^7.3.3

Changed

  • BREAKING: Removed keyringController property from constructor option (#1593)

Changed

  • Bump dependency and peer dependency on @metamask/approval-controller to ^3.5.1
  • Bump dependency on @metamask/base-controller to ^3.2.1
  • Bump dependency on @metamask/controller-utils to ^4.3.2
  • Bump dependency on @metamask/message-manager to ^7.3.1

Added

  • Add new methods setDeferredSignSuccess and setDeferredSignError (#1506)

Changed

  • Update @metamask/utils to ^6.2.0 (#1514)

Added

  • Add messages getter that returns all messages (#1469)
  • Add setMessageMetadata method for customizing the metadata for an individual message (#1469)

Changed

  • Report approval success using result callbacks (#1458)

Added

  • BREAKING Add sign version to approval message in Signature Controller (#1440)
    • Method newUnsignedTypedMessage on the SignatureController now requires a fourth argument: signingOpts
    • Method signMessage on the SignatureController no longer expects a version as a second argument. The second argument is now signingOpts which was previously the third argument.

Fixed

  • Remove optional parameter from newUnsignedTypedMessage function (#1436)

Changed

  • BREAKING: newUnsignedXMessage middlewares now creates and awaits approvals itself. (#1377)

Removed

  • BREAKING: Removed cancelXMessage and signXMessage from public API. (#1377)

Added

  • Add support for deferred signing (#1364)
    • If the parameter deferSetAsSigned is set, the message won't be set as signed when the keyring is asked to sign it
  • Emit the event ${methodName}:signed when the keying is asked to sign a message (#1364)
  • Add methods setTypedMessageInProgress and setPersonalMessageInProgress to set a message status to inProgress (#1339)

Changed

  • BREAKING: The constructor option getCurrentChainId now expects a Hex return value rather than string (#1367)
  • BREAKING: Update @metamask/approval-controller dependency and add it as a peer dependency (#1393)
  • Add @metamask/utils dependency (#1367)

Added

  • BREAKING: Add getCurrentChainId argument to constructor (#1350)

Added

  • Initial release (#1214)