Skip to content

Latest commit

 

History

History
183 lines (151 loc) · 8.36 KB

CHANGELOG.md

File metadata and controls

183 lines (151 loc) · 8.36 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.

Added

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

Fixed

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

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.

Changed

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

Fixed

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

Fixed

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

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.

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.

Added

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

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.

Fixed

  • Bump superstruct to ^1.0.3 (#71)

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)

Fixed

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

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

Added

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

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)

Fixed

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

Fixed

  • Bump superstruct to ^0.16.5 (#26)
    • superstructs 0.16.1 through 0.16.4 were not compatible with Node 14; this restores that compatibility.

Fixed

  • Promote @types/debug from development dependencies to production dependencies (#23)

Added

  • Add logging functions (#20)
  • Add frozen collections (implemented in #5 but exported in #19)

Changed

  • BREAKING: Improve types and type validation (#19)
    • Various type changes have been made that might be breaking:
      • The JsonRpcRequest and JsonRpcNotification types now include a generic constraint requiring that the Params type extends the JsonRpcParams type.
      • The JsonRpcSuccess and JsonRpcResponse types now include a generic contraint for the Result type, requiring that it extends the Json type.
      • Various validation functions now accept unknown parameters rather than specific types. This should not be breaking except that it may affect type inference for the parameters passed in.
    • New JSON-related functions have been added:
      • assertIsJsonRpcResponse
      • isJsonRpcResponse
      • InferWithParams
      • JsonRpcParams
    • New JSON Struct types have been added:
      • JsonRpcErrorStruct
      • JsonRpcFailureStruct
      • JsonRpcIdStruct
      • JsonRpcParamsStruct
      • JsonRpcRequestStruct
      • JsonRpcResponseStruct
      • JsonRpcSuccessStruct
      • JsonRpcVersionStruct
      • JsonStruct

Added

  • Add JSON storage validation and limit utilities (#14)
    • Adds a new function validateJsonAndGetSize.

Added

  • Add more JSON utils (#8)

Changed

  • BREAKING: Refactor and expand time utils (#9)
    • Adds a new function, inMilliseconds, and moves the time constants into a TypeScript enum.

Added

  • Initial release