Skip to content

Releases: MetaMask/utils

11.0.0

26 Nov 18:08
6201c23
Compare
Choose a tag to compare

Changed

  • BREAKING: generateRandomMnemonic now returns Promise<void> instead of void (#222)

10.0.1

05 Nov 11:08
88f742a
Compare
Choose a tag to compare

Added

  • Add Solana CAIP namespace (#219)

10.0.0

22 Oct 09:03
76ad2df
Compare
Choose a tag to compare

Changed

  • BREAKING: Drop support for Node.js versions 16, 21 (#212)
  • Improve JSON validation performance (#218)

9.3.0

09 Oct 13:21
9009f0d
Compare
Choose a tag to compare

Added

  • Add support for CAIP-19 (#183)
  • Add Bip122 member to KnownCaipNamespace (#213)

9.2.1

30 Aug 11:07
aac1497
Compare
Choose a tag to compare

Fixed

  • Fix wrong types for CAIP-2 and CAIP-10 structs (#210)

9.2.0

29 Aug 16:32
94c14db
Compare
Choose a tag to compare

Added

  • Add Wallet member to KnownCaipNamespace enum (#207)

9.1.0

15 Jul 15:23
1e502e9
Compare
Choose a tag to compare

Added

  • Add PublicInterface type (#197)

9.0.0

28 Jun 18:44
654f9cf
Compare
Choose a tag to compare

Changed

  • BREAKING: The return types of functions getChecksumAddress, numberToHex, bigIntToHex are narrowed from string to Hex (#193)

Fixed

  • Bump @metamask/superstruct from ^3.0.0 to ^3.1.0 (#194)
    • If @metamask/utils <=8.5.0 is used with @metamask/superstruct >=3.1.0 the following error may be encountered:
    error TS2742: The inferred type of 'ExampleType' cannot be named without a reference to '@metamask/utils/node_modules/@metamask/superstruct'. This is likely not portable. A type annotation is necessary.
    This can be resolved by updating @metamask/utils to >=9.0.0.

8.5.0

06 Jun 17:49
c72216b
Compare
Choose a tag to compare

Changed

  • Bump dependency semver from ^5.7.1 to ^7.6.0 (#181).

Fixed

  • Replace dependency superstruct ^1.0.3 with ESM-compatible @metamask/superstruct ^3.0.0 (#185).
    • This fixes the issue of this package being unusable by any TypeScript project that uses Node16 or NodeNext as its moduleResolution option.
  • Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#182)
    • 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 (#182).
    • 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.

8.4.0

15 Mar 15:25
665d0bc
Compare
Choose a tag to compare

Added

  • Add toCaipChainId utility function (#175)
  • Add KnownCaipNamespace enum (#175)

Changed

  • Update docs for createDeferredPromise to caution against using suppressUnhandledRejection (#174)

Fixed

  • Fix createSandbox to assign a unique name to the sandbox directory, so that it can be used in multiple concurrently running Jest tests (#171)