github hiero-ledger/hiero-sdk-js v2.71.0

latest releases: v2.84.0-beta.1, v2.83.0, v2.83.0-beta.3...
9 months ago

What's Changed

This release introduces enhancements for async client initialization across both web and native (React Native / Expo) environments, support for HIP-1046, and stricter validations across multiple APIs. These updates improve client reliability, developer experience, and transaction safety.

Enhancements

  • setStakedAccountId and setStakedNodeId are now explicitly mutually exclusive. Setting one clears the other.

  • setTransferAccountId and setTransferContractId are now explicitly mutually exclusive. Setting one clears the other.

  • Async Client Initialization (WebClient):
    Added new async initialization methods that fetch the latest address book during setup unless explicitly disabled via scheduleNetworkUpdate = false:

    • WebClient.forMainnetAsync()
    • WebClient.forTestnetAsync()
    • WebClient.forPreviewnetAsync()
    • WebClient.forNameAsync(name)
  • Async Client Initialization (NativeClient):
    Added async initialization methods for React Native / Expo users, also defaulting to auto-updating the address book:

    • NativeClient.forMainnetAsync()
    • NativeClient.forTestnetAsync()
    • NativeClient.forPreviewnetAsync()
    • NativeClient.forNameAsync(networkName)
  • HIP-1046 Support: Enabled in native environments, expanding protocol support. HIP-1046.

  • Contract Deletion:
    Implemented permanentRemoval in ContractDeleteTransaction, enabling permanent contract deletion behavior.

  • Contract Updates:
    Added ability to remove the auto-renew account in ContractUpdateTransaction by setting it to 0.0.0.

  • Contract Creation:
    Validation added to reject gas < 0 in ContractCreateTransaction.

  • Validation Improvements:
    Added validations in hex.js to reject invalid hex string decoding.

  • Networking (Native Clients):
    Native clients now attempt to retrieve node addresses from mirror nodes before falling back to hardcoded values in web environments.

Bug Fixes

  • Fixed a bug where an error status triggered the error callback twice.

Documentation

  • Added API usage, examples, and migration guidance for async client initialization.

Full Changelog: v2.70.0...v2.71.0

Don't miss a new hiero-sdk-js release

NewReleases is sending notifications on new releases.