Releases: MetaMask/utils
Releases · MetaMask/utils
4.0.0
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
Added
- Add
Keyring
types (#74)
- New data types added. These are
Keyring
, Transaction
(LegacyTransaction
, EIP2930Transaction
, EIP1559Transaction
), SignedTransaction
, Signature
, and Eip1024EncryptedData
.
3.5.0
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
Fixed
- Bump
superstruct
to ^1.0.3
(#71)
3.4.0
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
Fixed
- JSON-RPC parameters are now properly cast to Json upon validation (#51)
3.3.0
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
Added
- Add
PendingJsonRpcResponse
type (#43)
- Add utils for converting between numbers and hex (#41)
- Add coercion utils (#38)
3.1.0
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
Fixed
- Allow omitting JSON-RPC params when params can be undefined (#29)