Skip to content

Releases: MetaMask/utils

6.2.0

11 Jul 17:59
68384c6
Compare
Choose a tag to compare

Added

  • Add address related utils (#112)
    • isValidHexAddress has been added to check the validity of an hex address
    • getChecksumAddress has been added to calculate the ERC-55 mixed-case checksum of an hex address
    • isValidChecksumAddress has been added to check the validity of an ERC-55 mixed-case checksum address

6.1.0

20 Jun 14:08
1daaa37
Compare
Choose a tag to compare

Added

  • Add optional destroy method to Keyring type (#108)

6.0.1

14 Jun 12:31
b59adde
Compare
Choose a tag to compare

Fixed

  • Strip __proto__ and constructor JSON properties in getSafeJson (#105)

6.0.0

31 May 09:12
719854b
Compare
Choose a tag to compare

Changed

  • BREAKING: Bump minimum Node version to 16 (#102)
  • BREAKING: Target ES2020 (#102)

Fixed

  • Fix JSON validation security issue (#103)
    • This adds a new function getSafeJson which validates and returns sanitized JSON.

5.0.2

25 Apr 11:43
b217ca1
Compare
Choose a tag to compare

Changed

  • The Keyring exposes a new optional method init (#99)

Fixed

  • Bump @ethereumjs/tx to 4.1.2 to address runtime compatibility issues (#100)

5.0.1

11 Apr 14:07
32d423c
Compare
Choose a tag to compare

Fixed

  • Keep original type when using hasProperty if defined (#94)

5.0.0

06 Mar 21:25
f424d21
Compare
Choose a tag to compare

Changed

  • BREAKING: Update Keyring type (#89)
    • The Keyring class now uses the data types TypedTransaction and TxData from @ethereumjs/tx (v4.1.1).
    • The Keyring now exposes a new optional method called generateRandomMnemonic.

4.0.0

20 Feb 19:39
69dd9dd
Compare
Choose a tag to compare

Changed

  • Export new modules (keyring, transaction-types, and encryption-types) (#86)
  • BREAKING: Improve JSON validation (#85)
    • Fixes edge cases in our JSON validation logic.
    • The previous function used for JSON validation (validateJsonAndGetSize) was removed.
      • The isValidJson function now uses the new JSON validation logic.
      • To get the size of a JSON value, you can use the getJsonSize function.

3.6.0

20 Feb 13:29
42b832d
Compare
Choose a tag to compare

Added

  • Add Keyring types (#74)
    • New data types added. These are Keyring, Transaction (LegacyTransaction, EIP2930Transaction, EIP1559Transaction), SignedTransaction, Signature, and Eip1024EncryptedData.

3.5.0

16 Feb 13:10
b5d1a6f
Compare
Choose a tag to compare

Changed

  • Improve the hasProperty function (#79, #80)
    • This function now acts as a type guard, informing TypeScript that the property exists.
    • The function is now compatible with more types of objects, such as Errors and class instances.