Skip to content

v2.87.0

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Aug 13:46
· 5 commits to main since this release
v2.87.0
0dfd381

This stable release completes the first stage of the mirror-node migration story: a new MirrorNodeAccountBalanceQuery arrives as the replacement for AccountBalanceQuery ahead of its deprecation, mirror node streaming queries now work on WebClient and NativeClient (browsers and React Native, not just Node), and Client.ping() no longer depends on the cryptoGetBalance endpoint that consensus node release 77 throttles to zero. The @noble / @scure v2 upgrade reverted in v2.86.2 is re-applied with the ESM-only packages bundled into the CommonJS artifact, co-released as @hiero-ledger/cryptography@1.21.0.

This release also removes a set of long-deprecated APIs (deprecated since 2022): see Breaking Changes below.

Breaking Changes

  • Removed long-deprecated APIs: LiveHashAddTransaction, LiveHashDeleteTransaction, LiveHashQuery, LiveHash, AccountInfo.liveHashes, SystemDeleteTransaction, SystemUndeleteTransaction, EthereumFlow, AccountAllowanceAdjustTransaction, and toSolidityAddress() / fromSolidityAddress() on AccountId, ContractId, DelegateContractId, FileId, TokenId, and TopicId. ScheduleId.toSolidityAddress() / fromSolidityAddress() remain for now, as ScheduleId has no toEvmAddress() replacement yet. #4269

Upgrading

Replacements for the removed APIs:

  • EthereumFlowEthereumTransaction (jumbo transactions are supported natively)
  • AccountAllowanceAdjustTransactionAccountAllowanceApproveTransaction / AccountAllowanceDeleteTransaction
  • toSolidityAddress() / fromSolidityAddress()toEvmAddress() / fromEvmAddress() on the same entity ID classes
  • The live hash and system delete/undelete operations have no replacement: they were removed from HAPI and consensus nodes have returned NOT_SUPPORTED for years

Enhancements

  • MirrorNodeAccountBalanceQuery: mirror-node replacement for AccountBalanceQuery ahead of its deprecation. Accepts shard.realm.num IDs, EVM addresses, public-key aliases, and contract IDs, and returns a read-only MirrorNodeAccountBalance carrying hbars; 5xx/network failures retry with exponential backoff within a total requestTimeout budget. Token balances are deliberately out of scope per the migration proposal. #4320

    Usage Example:

    import { Client, MirrorNodeAccountBalanceQuery } from "@hiero-ledger/sdk";
    
    const client = Client.forTestnet();
    
    const balance = await new MirrorNodeAccountBalanceQuery()
        .setAccountId("0.0.12345") // or EVM address / alias / contract ID
        .execute(client);
    
    console.log(balance.hbars.toString());
  • WebClient / NativeClient: mirror node streaming queries (e.g. TopicMessageQuery subscriptions) now work in browsers and React Native, not just Node. Browsers stream binary gRPC-Web over fetch; React Native uses gRPC-Web text mode over XMLHttpRequest with incremental base64 decoding. #4268

Bug Fixes

  • Client.ping() / Client.pingAll(): the liveness probe now sends a free COST_ANSWER AccountInfoQuery instead of an AccountBalanceQuery, whose cryptoGetBalance endpoint is being throttled to zero in consensus node release 77. CostQuery (and therefore Query.getCost()) no longer requires an operator: the payment transaction is left unsigned when none is configured, so operator-less clients can still ping. #4312
  • NativeChannel (React Native): the gRPC callback is no longer invoked a second time after an HTTP error response. #4181

Dependency Changes

  • Re-applied the @noble / @scure v2 upgrade (@noble/curves, @noble/hashes, @noble/ciphers, @scure/base, @scure/bip32 → 2.2.0), with the ESM-only packages bundled into the CommonJS artifact (lib/index.cjs) via esbuild so require() no longer fails with ERR_REQUIRE_ESM on ts-node or Node.js < 20.19. Signature outputs are unchanged, and PublicKey.verify() continues to accept 65-byte recoverable ECDSA signatures. Co-released as @hiero-ledger/cryptography@1.21.0. #4296
  • Upgraded ansi-styles from 6.2.3 to 7.0.0. #4303