Skip to content

Releases: MetaMask/utils

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.

3.4.1

06 Jan 12:35
c29ba04
Compare
Choose a tag to compare

Fixed

  • Bump superstruct to ^1.0.3 (#71)

3.4.0

05 Jan 10:59
ef4a890
Compare
Choose a tag to compare

Added

  • Add types and utility functions for validating versions and checksums (#67, #69)

Fixed

  • JSON-RPC types now have a default generic Params value (#54)

3.3.1

07 Nov 14:22
4002fec
Compare
Choose a tag to compare

Fixed

  • JSON-RPC parameters are now properly cast to Json upon validation (#51)

3.3.0

02 Nov 11:08
5cdc1e9
Compare
Choose a tag to compare

Added

  • Add more assertion utils (#49)
  • Add JSON-RPC error validation functions (#46)
  • Add convenience function for creating a DataView (#45)

Fixed

  • Update JSON validation logic (#47)
    • Validation would previously allow for undefined values, which is not a standard JSON type

3.2.0

07 Oct 08:54
e35fa7d
Compare
Choose a tag to compare

Added

  • Add PendingJsonRpcResponse type (#43)
  • Add utils for converting between numbers and hex (#41)
  • Add coercion utils (#38)

3.1.0

03 Oct 09:17
970227e
Compare
Choose a tag to compare

Added

  • Add assertion utils (#33)
  • Add util functions for encoding and decoding bytes (#34)

Fixed

  • Make JSON-RPC error data property optional (#31)
  • Don't include test files in dist folder (#35)
  • Fix typo in README (#28)

3.0.3

26 Sep 13:09
65100c5
Compare
Choose a tag to compare

Fixed

  • Allow omitting JSON-RPC params when params can be undefined (#29)