Skip to content

Releases: hiero-ledger/hiero-sdk-swift

v0.47.0

02 Feb 17:07
adbb1ca

Choose a tag to compare

Summary

This release adds official support for Swift 6.x (6.0, 6.1, 6.2) while deprecating Swift 5.9 and 5.10. It also introduces a comprehensive difficulty-based issue labeling system to improve the contributor experience, along with CI/CD improvements and documentation updates.

Breaking Changes

None.

Upgrading

No migration steps required. Existing code targeting Swift 5.9+ will continue to work without modification.

Deprecated Features

  • Swift 5.9 and 5.10: These versions are now deprecated and will be removed in a future release (~6 months). Please migrate to Swift 6.0+ at your earliest convenience.
    • Swift 6.0+ is now the recommended version
    • App Store submissions require Xcode 16+ (Swift 6+) as of April 2025

Enhancements

  • Swift 6.x Support (#516): Added official support for Swift 6.0, 6.1, and 6.2

    • CI matrix now tests against all supported Swift versions (5.9, 5.10, 6.0, 6.1, 6.2)
    • Updated swift-format to 600.x for Swift 6 compatibility
  • Difficulty-Based Issue Labeling (#528): Implemented a comprehensive contribution system to help developers find appropriate entry points

    • Added skill-based labels: skill: good-first-issue, skill: beginner, skill: intermediate, skill: advanced
    • Created GitHub issue templates for each difficulty level
    • Added maintainer documentation with guidelines for each skill level
    • New documentation available in docs/maintainers/
  • Required CI Checks (#536): Configured Swift CI checks as required for PR merges

    • All five Swift version test jobs (5.9, 5.10, 6.0, 6.1, 6.2) are now required status checks
    • Ensures consistency between what we test and what we guarantee

Bug Fixes

None.

Dependency Changes

  • Upgraded Hiero Solo from v0.52.0 to v0.54.0 (#533)
  • Upgraded swift-format from 510.x to 600.x for Swift 6 compatibility

Documentation Updates

  • Added difficulty-based contribution guidelines in docs/maintainers/:
    • guidelines-difficulty-overview.md
    • guidelines-good-first-issues.md
    • guidelines-good-first-issue-candidates.md
    • guidelines-beginner-issues.md
    • guidelines-intermediate-issues.md
    • guidelines-advanced-issues.md
  • Updated maintainer guidelines link in MAINTAINERS.md (#555)
  • Added GitHub issue templates for each difficulty level

Version Support Matrix

Swift Version Status
5.9 ⚠️ Deprecated (supported for ~6 months)
5.10 ⚠️ Deprecated (supported for ~6 months)
6.0 ✅ Supported (recommended)
6.1 ✅ Supported
6.2 ✅ Supported

Contributors

Thank you to all contributors who made this release possible!

v0.46.0

20 Jan 17:02
72aba2f

Choose a tag to compare

Summary

Version v0.46.0 brings significant improvements to SDK stability, TCK (Test Compatibility Kit) feature parity, and developer experience. This release includes 13 bug fixes discovered during TCK integration, updated protobufs to v0.69.1, improved default transaction fees for revenue-generating topics (HIP-991), and comprehensive documentation updates.

Breaking Changes

None. All changes in this release are backwards compatible.

Upgrading

Update your Package.swift dependency to use version 0.46.0:

.package(url: "https://github.com/hiero-ledger/hiero-sdk-swift.git", from: "0.46.0")

Deprecated Features

  • None

Enhancements

  • TCK Feature Parity: Added 15 new JSON-RPC endpoints for automated cross-SDK compatibility testing

    • Account Service: getAccountBalance, getAccountInfo
    • Token Service: getTokenInfo, wipeToken
    • Topic Service: createTopic, updateTopic, deleteTopic, submitTopicMessage
    • Contract Service: createContract, updateContract, deleteContract, executeContract, contractCallQuery, contractByteCodeQuery, contractInfoQuery, createEthereumTransaction
    • SDK Service: setOperator
  • Improved Default Transaction Fees: Updated default max transaction fees to better support HIP-991 revenue-generating topics

    • TopicCreateTransaction: 2 Hbar → 25 Hbar
    • ScheduleCreateTransaction: 2 Hbar → 5 Hbar
  • CI Automation: Proto update script now automatically syncs hieroVersion in CI workflow, preventing version drift between development and CI environments

Bug Fixes

  • TokenInfo: Fixed autoRenewPeriod always returning nil even when network set a default value
  • TopicCreateTransaction: Fixed AUTORENEW_DURATION_NOT_IN_RANGE error by always including 90-day default autoRenewPeriod
  • TopicUpdateTransaction: Fixed inability to clear feeExemptKeys and customFees arrays
  • ChunkedTransaction: Fixed off-by-one error in chunk count calculation
  • CustomFeeLimit: Fixed crash on negative amounts using safe Int64(bitPattern:) conversion
  • ContractCreateTransaction: Fixed crash on large gas/stakedNodeId values and INVALID_RENEWAL_PERIOD error
  • ContractCreateTransaction: Fixed bytecodeFileId being cleared unexpectedly on nil assignment
  • ContractDeleteTransaction: Fixed OBTAINER_REQUIRED error caused by incorrect nil handling
  • ContractUpdateTransaction: Fixed stakedNodeId not taking precedence over stakedAccountId
  • ContractUpdateTransaction: Fixed INVALID_AUTORENEW_ACCOUNT error when using 0.0.0 sentinel
  • ContractExecuteTransaction: Fixed crash on large gas values
  • EvmAddress: Now accepts addresses with or without 0x prefix
  • TopicMessageQueryIntegrationTests: Fixed test flakiness with improved retry logic and exponential backoff

Dependency Changes

  • Updated protobufs submodule to v0.69.1
  • Updated Hiero Mirror Node in CI to v0.146.0

Documentation Updates

  • Removed LaunchBadge from maintainer attribution (no longer a maintainer)
  • Replaced all hiero-local-node references with Hiero Solo
  • Fixed incorrect GitHub URL (hiero-projecthiero-ledger)
  • Added table of contents to README for easier navigation
  • Added maintainer contact information (Discord IDs and emails) to MAINTAINERS.md
  • Updated required tooling documentation (added python3, removed incorrect OpenSSL reference)
  • Improved code examples and formatting throughout documentation

v0.45.0

07 Jan 17:12
dfdb6a0

Choose a tag to compare

Summary

This release brings significant improvements to the Hiero Swift SDK, including a new global gRPC deadline feature, critical batch transaction fixes, comprehensive cryptography refactoring, and 51 re-enabled integration tests. The release also updates protobufs to v0.69.0 and adds support for HIP-1300 (Increased Transaction Size for Governance Accounts).

Breaking Changes

  • None. All public APIs remain unchanged. Internal implementation changes are backwards compatible.

Upgrading

gRPC Deadline and Request Timeout Defaults

The default requestTimeout has been changed from ~15 minutes to 2 minutes. A new grpcDeadline setting has been added with a default of 10 seconds.

If your application relies on the previous timeout behavior, update your client configuration:

let client = Client.forTestnet()
try client.setRequestTimeout(900.0)  // Restore 15 minute timeout if needed

Validation

The SDK now validates that requestTimeout >= grpcDeadline. If you set custom values, ensure they satisfy this constraint or an HError.illegalState error will be thrown.

Deprecated Features

  • None

Enhancements

Global gRPC Deadline Setting

Added configurable grpcDeadline at the client level to provide consistent gRPC request timeout handling. This allows the SDK to abort unresponsive gRPC requests, mark nodes as unhealthy, and automatically rotate to the next available node.

let client = Client.forTestnet()

// Set global gRPC deadline (throws if > requestTimeout)
try client.setGrpcDeadline(5.0)  // 5 seconds

// Set request timeout (throws if < grpcDeadline)  
try client.setRequestTimeout(60.0)  // 60 seconds

Per-request overrides are also supported:

// Override deadline for a specific transaction
let response = try await TransferTransaction()
    .grpcDeadline(15.0)
    .execute(client)

// Override deadline for a specific query
let balance = try await AccountBalanceQuery()
    .grpcDeadline(3.0)
    .execute(client)

PrivateKey.getRecoveryId(r:s:message:)

Added a method to dynamically compute the ECDSA signature recovery ID (0-3) needed for Ethereum-compatible EIP-1559 transactions.

let signature = privateKey.sign(message)
let r = Data(signature.prefix(32))
let s = Data(signature.suffix(32))
let recoveryId = privateKey.getRecoveryId(r: r, s: s, message: message)

Query Assertion Helper Functions

Added new assertion helper functions to reduce boilerplate in query integration tests:

  • assertQueryPaymentPrecheckStatus - Asserts query payment precheck errors
  • assertQueryNoPaymentPrecheckStatus - Asserts query (no payment) precheck errors
  • assertMaxQueryPaymentExceeded - Asserts max query payment exceeded errors

Admin Client Support for Test Infrastructure

The test environment now exposes two clients for integration testing:

  • client - Uses the operator credentials from environment variables (regular account)
  • adminClient - Uses the system account 0.0.2 for privileged operations

All entity creation helper methods now accept an optional useAdminClient: Bool = false parameter.

HIP-1300 Integration Tests

Added integration tests for HIP-1300 (Increased Transaction Size for Governance Accounts) covering:

  • Admin accounts creating transactions exceeding the 6KB limit
  • Admin accounts creating files with >6KB content
  • Regular accounts receiving TRANSACTION_OVERSIZE for oversized transactions

Automated Status Code Synchronization

Added sync_status_codes.py script that automatically keeps Status.swift synchronized with response_code.proto:

  • Parses proto files to extract all status codes with comments
  • Adds missing status codes to all required sections
  • Updates comments and deprecated status when they change
  • Runs automatically as part of task submodule:generate
# Run manually with options
python3 sync_status_codes.py --dry-run --verbose

New Status Codes

Added 33 status codes that were missing from Status.swift:

  • 361-363: Pending airdrop ID validation codes
  • 400-401: NFT transfer and serialization codes
  • 499-526: Hook-related status codes (lambdas, EVM hooks, etc.)

Cryptography Refactoring

Comprehensive refactoring of the cryptography implementation:

  • Removed 26 #if canImport conditional compilation blocks (~300 lines)
  • Unified on swift-crypto (replacing CryptoKit conditionals)
  • Unified on CryptoSwift (replacing CommonCrypto conditionals)
  • Reorganized Crypto/ directory to a flat, well-named collection of 11 files
  • Simplified API by removing CryptoNamespace wrapper enum
Before After
CryptoNamespace.Sha2.sha256(data) Sha2.sha256(data)
CryptoNamespace.Keccak.keccak256(data) Keccak.keccak256(data)
CryptoNamespace.Pem.decode(...) Pem.decode(...)

Integration Test Improvements

Re-enabled 51 previously disabled integration tests across the SDK:

  • 8 Batch Transaction tests
  • 8 Topic tests
  • 4 Token tests
  • 4 Contract tests
  • 2 Node tests
  • 2 Ethereum tests
  • 23 Query Cost tests

Bug Fixes

Batch Transaction Serialization (HIP-551) ⭐ Critical

Problem: Inner transactions in BatchTransaction were being serialized as the outer Transaction protobuf wrapper, causing the consensus node to reject them with TRANSACTION_HAS_UNKNOWN_FIELDS.

Fix: Added makeSignedTransactionProtobuf(chunkInfo:) method and updated serialization to use raw SignedTransaction bytes as expected by the consensus node's AtomicBatchHandler.

TopicCreateTransaction autoRenewAccountId Override

Problem: When freezeWith(client) was called, the autoRenewAccountId was being overwritten by the client's operator, even when a custom transactionId with a different payer was set.

Fix: Modified freezeWith to only derive autoRenewAccountId from the transaction ID's account ID.

INVALID_NODE_ACCOUNT Handling

Problem: The SDK would continue retrying indefinitely when all nodes returned INVALID_NODE_ACCOUNT, causing test timeouts instead of immediate failure.

Fix: Added ExecutionResult.invalidNodeAccount case that throws immediately when all explicitly specified nodes return this status after an address book update.

Local Development Endpoint Mapping for Kubernetes

Problem: When running against a local Hiero network via Solo, the address book contains internal Kubernetes DNS names where all nodes use port 50211, causing endpoint collisions.

Fix: Added mapEndpointForLocalDevelopment helper that remaps network-node2-svc.solo.svc.cluster.local:50211 to port 51211 for local port-forwarding compatibility.

Mirror Node Contract Query Local Development Detection

Problem: The SDK was using client.ledgerId == nil to detect local development for mirror node contract queries, but this condition is not reliable.

Fix: Changed to use string matching for "localhost" or "127.0.0.1" in the mirror network address. Also improved error handling to include HTTP status code and response body in error messages.

Status Codes 361-363 Mapping Bug

Problem: Status codes 361, 362, and 363 were defined as enum cases but were missing from the init(rawValue:) switch statement, causing them to be incorrectly mapped to .unrecognized.

Fix: Added the missing cases to init(rawValue:).

Dependency Changes

Removed

  • OpenSSL-Package - Never used (Keccak-256 was already using CryptoSwift)
  • attaswift/BigInt - Consolidated to NumberKit which was already used elsewhere

Updated

  • Protobufs submodule updated to v0.69.0

CI Updates

  • Updated Hiero version from v0.68.4 to v0.69.0
  • Updated to latest versions of Solo and Mirror Node

Documentation Updates

Tests/README.md

Added documentation for Kubernetes DNS Configuration required for Node Update Tests:

127.0.0.1 network-node1-svc.solo.svc.cluster.local
127.0.0.1 network-node2-svc.solo.svc.cluster.local

Cryptography Documentation

  • Added comprehensive Javadoc-style headers to all crypto files
  • Added doc comments to every public/internal function, type, and property
  • Added // MARK: sections to PrivateKey.swift, PublicKey.swift, and Mnemonic.swift

v0.44.0

18 Dec 21:59
b6f905e

Choose a tag to compare

Summary

This release contains a variety of refactorings and testing improvements, as well as HIP-1299.

Enhancements

  • HIP-1299: This HIP provides the ability for the SDK to automatically update its client address books after a NodeUpdateTransaction (based on when it receives an INVALID_NODE_ACCOUNT error from the consensus node). This increases the robustness of the SDK to operate in more uncertain network conditions.
  • CI Integration Testing: Integration testing was setup in the GitHub CI to allow for automatic regression testing of the SDK. This involved switching builds from the GitHub-provided macOS runners to Hashgraph self-hosted Linux runners, and utilizing the Hiero Solo Action to setup a proper testing environment.
  • Test Suite Refactor: The entire SDK test suite was refactored to allow for more granular control of test conditions and test network setup. It allows for different profiles to be loaded with various different settings, and for automatic entity cleanup. It cleans up the test setup, as well as provides documentation on how different testing environments can be setup.
  • Networking Refactor: The SDK networking layer was refactored to improve performance, maintainability, and code quality. The refactor consolidated duplicate code, optimized hot paths, enhanced documentation, and applied Swift best practices throughout the client networking infrastructure.

Dependency Changes

  • Crypto and CryptoSwift: Dependencies were added to allow for cross-compilation on Linux runners.

Documentation Updates

  • Comprehensive testing documentation added to README.md and Tests/README.md. This gives an in-depth description of testing targets, how to run certain tests, and all configuration options for tests.

Full Changelog: v0.43.0...v0.44.0

v0.43.0

17 Sep 21:47
5299a89

Choose a tag to compare

Release Notes - Version 0.43.0

Summary

This release contains several HIP implementations, as well as TCK endpoints and a bug fix for node connections.

Enhancements

  • HIP-1046: This HIP enables gRPC web proxies to be set and updated when creating and updating a new consensus network node, respectively.
  • HIP-1064: This HIP enables the disabling of active node rewards for a node.
  • HIP-745: This HIP allows Transactions to be serialized without needing all required transaction fields to be set (notably, nodeAccountId and transactionId).
  • TCK Endpoints: Many remaining TCK endpoints were added to the SDK server, allowing those JSON-RPC methods from the TCK to now be served.

Bug Fixes

  • TLS/Plaintext Node Connections: There was an issue with connecting to local networks (i.e. Solo) and other custom networks that would cause connections to consensus nodes fail; TLS connections would be tried on plaintext connection ports, and vice versa. The decision logic was updated to correctly choose the right port.

Full Changelog: v0.42.0...v0.43.0

v0.42.0

26 Jul 00:17
72a0696

Choose a tag to compare

Release Notes - Version 0.42.0

Summary

This release includes a couple changes for EVM related items, notably the deprecation of EthereumFlow and the removal of shard and realm encoding for EVM addresses as outlined here. There was also a fix for the SDK being unable to query the address book of a local Solo instance.

Deprecated Features

  • EthereumFlow: EthereumFlow has been deprecated. EthereumFlow was first implemented as an easy way for developers to deploy contracts that were over the maximum size allowed for Hiero transactions. However, with the addition of HIP-1086, this maximum size has been increased to the maximum allowed size for a contract. So now, there is no longer a need to create a file with the call data; it can all be just packed into the EthereumTransaction itself. As such, users are encouraged to now use EthereumTransaction instead of EthereumFlow.

Enhancements

  • Remove shard and realm encoding of EVM addresses for entities: shard and realm for Hiero entities are no longer encoded into their associated EVM addresses. The decision for this is explained here.

Bug Fixes

  • Fix solo mirror node gRPC connection issue: There was a bug that wasn't allowing a user to submit AddressBookQuerys to a local solo deployment. This has been fixed, as well as testing the Client.forMirrorNetwork API and confirming it works with solo.

Documentation Updates

  • Fix OpenSSF scorecard link in README: the link to the OpenSSF scorecard for this repo was incorrect, so it was fixed.

Full Changelog: v0.41.0...v0.42.0

v0.41.0

09 Jul 16:01
fa79c9c

Choose a tag to compare

Release Notes - Version 0.41.0

Summary

This release has several non-code updates to repo files, notably dependencies. It also adds persistent shard and realm support to Client to allow for proper daily address book updates.

Enhancements

  • Persistent Shard and Realm Client Support: shard and realm fields were added to the Client. This allows for proper address book querying for non-zero shard and realm address books across lifecycle events.

Dependency Changes

  • Update Dependencies to up to Version Numbers: pegging dependencies to specific releases allows for more consistency across SDK builds and lessens the chance of using vulnerable dependencies releases.
  • Update Protobufs: updating the protobufs used by the SDK allows for newer features to be used and implemented in the SDK.

Documentation Updates

  • Update README and MAINTAINERS Markdown Files: Updates to these files were included to reference the OpenSSF scorecard, as well as keeping track of the maintainers of this SDK, respectively.

Full Changelog: v0.40.0...v0.41.0

v0.40.0

10 Jun 19:45
d46ee7a

Choose a tag to compare

Release Notes - Version 0.40.0

Summary

This release adds SDK metric capabilities. These additions will allow the consensus node to track which requests it receives were sent by the Hiero Swift SDK, as well as the version of the SDK that was used to submit it.

Enhancements

  • SDK Metrics: Fields were added to the gRPC headers of any request being sent to a Hiero network from the Swift SDK to acknowledge that the Swift SDK is submitting the request, as well as what version of the Swift SDK is submitting. This will be captured on the consensus node side and metrics will be kept. This will allow node operators to see how many requests it's receiving from the Swift SDK, as well as how often users update their SDKs.

v0.39.0

29 May 14:57
73b24e2

Choose a tag to compare

Release Notes - Version 0.39.0

Summary

This release re-implements processing for HIP-1021, which set the auto-renew account ID for a topic to be equal to the transaction fee payer if it has not been set manually. It also implements static file ID getters for non-zero shard and realm networks.

Enhancements

  • Automatic Setting of Auto-Renew Account ID for New Topics: HIP-1021 allows now for the automatic setting of a new topics autoRenewAccountId to be equal to the fee payer of the account. This feature was added previously, disabled, but then re-enabled in the Swift SDK for this release.
  • Static File IDs for Non-Zero Shards and Realms: There are some static file IDs provided by the Swift SDK that point to important network files, such as the address book. The file IDs previously provided the the SDK only referenced the files with zero shard and realms. Functions were added to allow the versions of these files to be retrieved for non-zero shard and realm networks.

v0.38.0

15 May 20:46
5310a8a

Choose a tag to compare

This release offers support for two new features: Atomic Batch Transactions as a part of HIP-551, and mirror node queries to allow for users to get an estimate of the gas cost to execute a smart contract.

Enhancements

  • BatchTransaction: A new API class that allows users of the Swift SDK to submit an AtomicBatchTransaction HAPI request to a Hiero network. This transactions allows users to submit more than one transaction at a time and have the transactions retain atomic properties (i.e. all of the transactions are executed, or none of them). #452
  • MirrorNodeContractQuery, MirrorNodeContractCallQuery, MirrorNodeContractEstimateGasQuery: New APIs that allow users more flexibility when calling smart contracts. A user can now get an estimated gas cost for a smart contract call, which can help a user get more accurate gas costs and reduce the risk of wasting excess gas. #455

Documentation Updates

  • MAINTAINERS.md: A new markdown file was added to keep track of the maintainers of this repo. This is a standard in all Hiero repos.