v0.2.0 #1787
exploreriii
announced in
Announcements
v0.2.0
#1787
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This release is large. The headline themes are: stricter typing, better ergonomics, broader receipt/query capabilities, TLS hardening, and a major cleanup of examples, docs, and automation.
The source code changes are described at a high level:
New Features
EVM & Mirror Node Integration:
AccountId now supports initialization and conversion from EVM addresses (20-byte hex).
Added populate_account_num and populate_evm_address to AccountId to resolve missing identifiers via Mirror Node REST queries.
ContractId updated with to_evm_address using a new to_solidity_address helper.
Client Enhancements:
Key Utilities:
Data Models:
Hbar Units:
Changes & Improvements
Developer Experience:
Query Execution:
Standardized execute() methods across various queries (e.g., AccountRecordsQuery, ContractInfoQuery, TokenInfoQuery) to accept an optional timeout parameter.
Improved query payment logic to fallback to the client-level default_max_query_payment if not explicitly set on the query.
Transaction Handling:
AccountCreateTransaction now accepts both PrivateKey and PublicKey for setting account keys.
Added set_transaction_valid_duration to the base Transaction class.
Node Management:
Deprecations:
Behavioral Changes:
AccountId.hash now only hashes the shard, realm, and num, excluding the alias_key.
The Client now defaults to a 10-second gRPC deadline and a 120-second request timeout.
[0.2.0] - From changelog entries
Src - Breaking Changes
Deprecations:
Remove deprecated 'in_tinybars' parameter and update related tests
/src/hiero_sdk_python/hbar.py,/tests/unit/hbar_test.pyand/src/hiero_sdk_python/tokens/custom_fixed_fee.py.Behavioral Changes:
AccountId.hash now only hashes the shard, realm, and num, excluding the alias_key.
The Client now defaults to a 10-second gRPC deadline and a 120-second request timeout.
Src
New:
feat: AccountCreateTransaction now supports both PrivateKey and PublicKey #939
Support selecting specific node account ID(s) for queries and transactions and added
Network._get_node()with updated execution flow (feat: Add set node account id method #362)Add support for include_children in TransactionGetReceiptQuery (Add support for
include_childreninTransactionGetReceiptQuery#1100)(Add support forinclude_childreninTransactionGetReceiptQuery#1100)Added support for include duplicates in get transaction receipt query (Add support for
include_duplicatesin TransactionGetReceiptQuery #1166)Add TLS support with two-stage control (
set_transport_security()andset_verify_certificates()) for encrypted connections to Hedera networks. TLS is enabled by default for hosted networks (mainnet, testnet, previewnet) and disabled for local networks (solo, localhost) (Implement TLS support #855)Add contract_id support for CryptoGetAccountBalanceQuery(#1293)
Add StakingInfo class (1364)
Added first-class support for EVM address aliases in
AccountId, including parsing, serialization, Mirror Node population helpers.Added MirrorNode based population for
ContractId, including parsing and serialization support.Added
grpc_deadlinesupport for transaction and query execution.Added
Client.from_env()and network-specific factory methods (e.g.,Client.for_testnet()) to simplify client initialization and reduce boilerplate. [#1251]Added convenient factory methods to
Hbarclass for easier instantiation:from_microbars(),from_millibars(),from_hbars(),from_kilobars(),from_megabars(), andfrom_gigabars(). #1272Support for setting
max_query_payment,Query.set_max_query_payment()allows setting a per-query maximum Hbar payment andClient.set_default_max_query_payment()sets a client-wide default maximum payment.Allow
PublicKeyfor batch_key inTransaction, enabling bothPrivateKeyandPublicKeyfor batched transactionsAllow
PublicKeyforTokenUpdateKeysinTokenUpdateTransaction, enabling non-custodial workflows where operators can build transactions using only public keys (Allow PublicKey forTokenUpdateKeysinTokenUpdateTransaction#934).Changed
TransactionResponse.get_receipt()so now pins receipt queries to the submitting node viaset_node_account_ids()(#1686)fix: TLS Hostname Mismatch & Certificate Verification Failure for Nodes
fix: ensure all Query sub-class
execute()function to correctly propagate the optionaltimeoutparameter.Added
AssessedCustomFeedomain model to represent assessed custom fees. (#1637)Added Hbar object support for TransferTransaction HBAR transfers: Methods now accept
Union[int, Hbar]for amount parameters with immediate normalization to tinybarsAdded all missing fields to
__str__()method and updatedtest_token_info.pyAdded
__str__()to CustomRoyaltyFee and updated examples and tests accordingly (Add a _str_ method to src/hiero_sdk_python/tokens/custom_royalty_fee.py #986)Added str and repr to AccountBalance
Added
__eq__and__hash__functions for KeyType hints to exception classes (
PrecheckError,MaxAttemptsError,ReceiptStatusError) constructors and string methods.Added missing type hints to sign method in Transaction class ([Beginner]: Add Missing Type Hints to
signMethod in Transaction Class #1630)Add return type hint to
ContractId.__str__. ([Good First Issue]: Add return type hint toContractId.__str__method #1654)Add return type hint to
AccountId.__repr__for type consistency. ([Good First Issue]: Add return type hint to AccountId.__repr__ method #1503)Updated return of to_bytes function in
src/hiero_sdk_python/transaction/transaction.py. ([Beginner]: Add Missing Type Hint toto_bytesMethod in Transaction Class #1631)Added missing return type
src/hiero_sdk_python/utils/entity_id_helper.py. ([Good First Issue]: Add Missing Return Type Hint toparse_from_stringFunction #1622)Improved docstring for
account_allowance_approve_transaction_nft.pywith purpose, key concepts and required vs optional steps.Implement custom
__repr__method forFileIddataclass class that returns constructor-style representation for improved debugging experience ([Beginner]: Implement__repr__Method forFileIdClass #1628)Added
__str__and__repr__methods toAccountInfoclass for improved logging and debugging experience (Expand src/hiero_sdk_python/account/account_info.py to add __repr__ and __str__ #1098)Added support for the
includeDuplicatesflag inTransactionRecordQueryandduplicatesfield inTransactionRecord(Add support forinclude_duplicatesto the TransactionRecordQuery class #1635)Add repr custom method for ContractId class to improve debugging (feat: implement __repr__ method for ContractId class #1714)
Add
__repr__()method toTopicIdclass for improved debugging with constructor-style representation ([Beginner]: Implement__repr__Method forTopicIdClass #1629)Added comprehensive docstring to
FeeAssessmentMethodenum explaining inclusive vs exclusive fee assessment methods with usage examples. ([Good First Issue]: Add docstring to FeeAssessmentMethod enum in src/hiero_sdk_python/tokens/fee_assessment_method.py #1391)Added comprehensive docstring to
TokenTypeenum explaining fungible vs non-fungible tokens with practical use cases. ([Good First Issue]: Add comprehensive docstring to TokenType enum in src/hiero_sdk_python/tokens/token_type.py #1392)Added
__str__()to CustomFixedFee and updated examples and tests accordingly.Examples
verify_freeze()to treat only ACCOUNT_FROZEN_FOR_TOKEN as a successful freeze verification ([Good First Issue]: Adjust response code checking in examples/tokens/token_freeze_transaction.py #1515)account_create_transaction_create_with_alias.pyexample by splitting monolithic function into modular functions:generate_main_and_alias_keys(),create_account_with_ecdsa_alias(),fetch_account_info(),print_account_summary()([Good First Issue]: Refactor examples/account/account_create_transaction_create_with_alias.py #1016)transfer_transaction_fungibleexample by introducingaccount_balance_query()&transfer_transaction().Renamedtransfer_tokens()→main()examples/consensus/topic_create_transaction.pyto useClient.from_env()([Good First Issue]: Refactortopic_create_transaction.pyto useClient.from_env()#1611)account_create_transaction_without_alias.pyinto smaller, modular functions.([Good First Issue]: Refactor examples/account/account_create_transaction_without_alias.py for clarity #1321)account_create_transaction_with_fallback_alias.pyby splitting the monolithiccreate_account_with_fallback_aliasfunction into modular functions:generate_fallback_key,fetch_account_info, andprint_account_summary. The existingsetup_client()function was reused for improved readability and structure ([Good First Issue]: Refactor examples/account/account_create_transaction_with_fallback_alias.py #1018)account_create_transaction_evm_alias.pyto improve readability by splitting the monolithic function into smaller helper functions. #1017token_airdrop_claim_autoexample for pylint compliance (no functional changes). ([Good First Issue]: pylint ./examples/tokens/token_airdrop_claim_auto.py #1079)examples/queryusing black ([Good First Issue]: format black examples/query #1082)([Good First Issue]: format black examples/query #1082)token_airdrop_claim_signature_requiredexample for pylint compliance (no functional changes). ([Good First Issue]: pylint examples/tokens/token_airdrop_claim_signature_required.py #1080)examples/tokens/custom_fee_fixed.pyto be an end-to-end example, that interacts with the Hedera network, rather than a static object demo.examples\tokens\custom_royalty_fee.pyto be an end-to-end example, that interacts with the Hedera network, rather than a static object demo.examples/tokens/custom_royalty_fee.pyby splitting monolithic function custom_royalty_fee_example() into modular functions create_royalty_fee_object(), create_token_with_fee(), verify_token_fee(), and main() to improve readability, cleaned up setup_client() ([Good First Issue]: Refactor examples/tokens/custom_royalty_fee.py for modularity #1169)setup_client()in allexamples/query/files to useClient.from_env()for simplified client initialization ([Beginner]: Refactor def setup_client() in examples/query #1449)account_allowance_delete_transaction_hbar.pyfromexamples/toexamples/account/for better organization ([Good First Issue]: Move examples/account_allowance_delete_transaction_hbar.py to examples/account/account_allowance_delete_transaction_hbar.py #1003)examples/account/account_create_transaction_create_with_alias.pyandexamples/account/account_create_transaction_evm_alias.pyto use the nativeAccountInfo.__str__method for printing account details, replacing manual JSON serialization. (#1263)transfer_transaction_hbar.pyexample to useHbarobjects instead of raw integers and added receipt checking withResponseCodevalidation.(#1249)file_info_query.pyto useprint(info)instead of manual formatting ([Good First Issue]: Avoid manually printing file info in examples/file/file_info_query.py #1451)ResponseCode.get_name(receipt.status)with theResponseCode(receipt.status).nameacross examples and integration tests for consistency. (Replace ResponseCode.get_name(receipt.status) #1136)AccountCreateTransaction.set_key()usage withset_key_without_alias()andset_key_with_alias()across examples and testsexamples/utils.pyas its helper functions are no longer needed. (#1263)token_airdrop_transaction.pyto correctly check if tokens are associated by usingtoken_id in token_balancesinstead of incorrectly displaying zero balances which was misleading (#[815])token_dissociate_transaction.pyexample to improve usability for new users ([Good First Issue]: Align file name and improve error handling in examples/token_dissociate_transaction.py #1468)transfer_transaction_tinybar.pyexample demonstrating tinybar transfers with both integer and Hbar object approaches. (#1249)transfer_transaction_gigabar.pyexample demonstratingGIGABARunit usage for large-value transfers. (#1249)Docs
#1591)docs/sdk_developers/training/setup/setup_windows.md) with PowerShell installation instructions. ([Intermediate]: Create a setup guide for windows #1570)Queryclass, covering execution flow, payments, retries, and building child queries. ([Intermediate]: Create docs/sdk_developers/training/query.md #1238)docs/sdk_developers/training/coding_token_transactions.md) ([Good First Issue]: Add code examples for Method Chaining in coding_token_transactions.md #1194)docs/sdk_developers/how-to-pin-github-actions.md)([Good First Issue]: create docs/sdk_developers/how-to-pin-github-actions.md #1211)docs/maintainers/good_first_issue_candidate_guidelines.md) and Good First Issues guidelines documentation (docs/maintainers/good_first_issues_guidelines.md) ([Good First Issue]: Create docs/maintainers/good_first_issue_candidate_guidelines.md #1066)docs/sdk_developers/training/testing_forks.md).docs/sdk_developers/training/executable.mddocs/maintainers/good_first_issues.mdfile for maintainers to write Good First Issue guidelines ([Good First Issue]: Create docs/maintainers/good_first_issues.md #1034)testing.md, clean upCONTRIBUTING.mdTOC, and normalize test file naming and paths (#1706)compress_with_cryptographyfunction ([Good First Issue]: Add Missing Docstring tocompress_with_cryptographyFunction #1626)entity_id_helper.pywith one that is correct. ([Good First Issue]: Fix Incorrect Docstring inparse_from_stringFunction #1623)#1665)docs/sdk_developers/how_to_link_issues.mdtodocs/sdk_developers/training/workflow/how_to_link_issues.mdand updated all references ([Good First Issue]: Move docs/sdk_developers/how_to_link_issues.md to docs/sdk_developers/training/workflow/how_to_link_issues.md #1222)CONTRIBUTING.md([Good First Issue]: Fix link in README #1664)docs/sdk_developers/training/transaction_lifecycle.mdto explain the typical lifecycle of executing a transaction using the Hedera Python SDK.coding_token_transactions.mdfor a high level overview training on how token transactions are created in the python sdk.Coderabbit AI
.coderabbit.yamlfor improved automated PR feedback on ABI, gas, ContractId, and protobuf safety. ([Advanced]: Prompt code rabbit on how to review src/hiero_sdk_python/contract #1695)tokensmodule changes, with specialized validation rules for token transactions, token classes, and enums. (feat: Added Token Review Instructions #1496)Queryand it's sub-classes..github
#1668)and deserialization (feat: Add ProtoBuff Training Guide #1645)
/unassigncommand allowing contributors to remove themselves from assigned issues.([Intermediate]: Create /unassign bot #1472)/assigncommand support and helpful reminders. ([Intermediate]: Automate assignment for beginner issues #1368)workflow_dispatchtrigger for testing without posting comments. ([Beginner]: Enable dry run support to office hour bot .github/workflows/bot-office-hours.yml #1426)advancedissues; requires completion of at least onegood first issueand oneintermediateissue before assignment (exempts maintainers, committers, and triage members). (Create workflow that ensures advanced issue assigned only to those who are familiar with the code #1142).github/workflows/bot-coderabbit-plan-trigger.ymlto automatically invoke CodeRabbit's plan feature on intermediate and advanced issues, providing implementation guidance to help contributors assess complexity and understand requirements. ([Intermediate]: Trigger code rabbit plan for intermediate issues #1289).github/workflows/bot-pr-auto-draft-on-changes.ymlto automatically convert PRs to draft and notify authors when reviewers request changes.DRY_RUNsupport, and fixed handling of cross-repo PR references for stale detection..github/workflows/bot-assignment-check.ymlto limit non-maintainers to 2 concurrent issue assignments..coderabbit.yaml.github/workflows/bot-community-callsand its script to notify issue creators of a community call.github/workflows/pr-inactivity-reminder-bot.yml.github/ISSUE_TEMPLATE/04_good_first_issue_candidate.ymlfile (1068)(Create .github/ISSUE_TEMPLATE/04_good_first_issue_candidate.yml #1068).github/ISSUE_TEMPLATE/01_good_first_issue.ymlwith welcoming message and acceptance criteria sections to guide contributors in creating quality GFIs (Expand .github/ISSUE_TEMPLATE/01_good_first_issue.yml to include Thanks & GFI Criteria #1052).github/ISSUE_TEMPLATE/05_intermediate_issue.ymlfile (1072)(Create .github/ISSUE_TEMPLATE/05_intermediate_issue.yml #1072).github/ISSUE_TEMPLATE/06_advanced_issue.yml..github/workflows/cron-check-broken-links.ymlworkflow to perform scheduled monthly Markdown link validation across the entire repository with automatic issue creation for broken links (#1210).github/workflows/bot-linked-issue-enforcer.yml..github/workflows/bot-merge-conflict.yml) and helper script (.github/scripts/bot-merge-conflict.js) to detect and notify about PR merge conflicts, with retry logic for unknown mergeable states, idempotent commenting, and push-to-main recheck logic (ci: update merge conflict bot to trigger on main #1247)bot-p0-issues-notify-team.ymlbot-gfi-notify-team.yml(Create .github/workflows/bot-GFI-issues-notify-support.yml #1115).github/workflows/bot-workflows.ymlto use dedicated script.github/scripts/bot-workflows.jsfor improved maintainability and testability. (#1288)/workingcommand to reset the inactivity timer on issues and PRs. (#1552)bot-verified-commits.ymlworkflow to use modular JavaScript with configurable environment variables, input sanitization, dry-run mode support, and SHA-pinned actions. ([Intermediate]: Harden and upgrade .github/workflows/bot-verified-commits.yml #1482).github/scripts/pr-check-changelog.sh) to clarify behavior, inputs, permissions, and dependencies [([Beginner]: Add Top level explanation to .github/scripts/pr-check-changelog.sh #1337)]/unassigncommand information for contributors (chore: expand inactivity bot messages to include /unassign info #1555).github/scripts/check_advanced_requirement.shtobot-advanced-check.shfor workflow consistency ([Good First Issue]: Rename .github/scripts/check_advanced_requirement.sh to bot-advanced-check.sh #1341).github/scripts/to match their corresponding workflow file names for improved consistency and maintainability ([Good First Issue]: Rename workflows so script and workflow names match #1198)examples.yml→pr-check-examples.yml,test.yml→pr-check-test.yml([Good First Issue]: Rename .github/workflows pr checks to be consistent #1043).github/workflowsto be consistent ([Good First Issue]: Rename .github/workflows/ bots to be consistent #1042)@user) in comments. (#1232)pr-missing-linked-issue.ymlandpr_missing_linked_issue.jstobot-pr-missing-linked-issue.ymlandbot-pr-missing-linked-issue.jsrespectively. Enhanced LinkBot PR comment with clickable hyperlinks to documentation for linking issues and creating issues. ([Good First Issue]: Rename .github/workflows/pr-missing-linked-issue.yml to .github/workflows/bot-pr-missing-linked-issue.yml #1264).github/workflows/bot-workflows.ymlto match correct references [([Good First Issue]: Update .github/workflows/bot-workflows.yml with correct workflow names #1284)].github/scripts/bot-office-hours.shto detect and skip PRs created by bot accounts when posting office hours reminders. ([Beginner]: Edit .github/scripts/bot-office-hours.sh to avoid posting on pull requests by bots #1384).github/scripts/bot-assignment-check.sh#1485)/assignreminders for repository collaborators to avoid unnecessary notifications.([Beginner]: Ensure that reminder workflow ignores team members #1568)./unassigncommand in the PR inactivity reminder message so it displays correctly with backticks. ([Good First Issue]: Correct backtick parsing in .github/scripts/pr_inactivity_reminder.js #1582)dry-runinput inbot-community-calls.ymlworkflow ([Beginner]: Fix .github/workflows/bot-community-calls.yml and .github/scripts/bot-community-calls.sh to pass dry run true #1425)/assignreminders for repository collaborators. ([Intermediate]: Exclude team members to get notified with reminder to /assign on Good First Issues #1367)bot-workflows.ymlto trigger only on open PRs with failed workflows; ignore closed PRs and branches without open PRs.pr-check-test-filesandpr-check-codecovcron-check-broken-links.ymlstring parsing issue in context inputdry_run([Good First Issue]: Fix string parsing in .github/workflows/cron-check-broken-links.yml #1235).github/scripts/bot-community-calls.shto skip posting reminders on issues created by bot accounts. ([Beginner]: Edit .github/scripts/bot-community-calls.sh to skip posting on bot user issues #1383).github/scripts/bot-advanced-check.shto unassign unqualified users..github/scripts/update-spam-list.js.github/workflows/cron-update-spam-list.yml..github/scripts/bot-issue-reminder-no-pr.sh(fix: switch to GraphQL for issue assignment and PR checks #1746)Tests
tests/unit/crypto_utils_test.pywith black for code style consistency ([Good First Issue]: format black tests/unit/crypto_utils_test.py #1524)tests/unit/entity_id_helper_test.pyusing Black for consistent code style across the test suite ([Good First Issue]: format black tests/unit/entity_id_helper_test.py #1527)tests/unit/get_receipt_query_test.pywith black for code style consistency. ([Good First Issue]: format black tests/unit/get_receipt_query_test.py #1537)tests/unit/hbar*.py.([Good First Issue]: format black tests/unit/hbar*.py #1538)tests/unit/conftest.pywith black for code style consistency. ([Good First Issue]: format tests/unit/conftest.py #1522)black tests/unit/nft_id_test.pywith Black.([Good First Issue]: format black tests/unit/nft_id_test.py #1544)tests/unit/executable_test.pywith Black.([Good First Issue]: format black tests/unit/executable_test.py #1530)tests/unit/hedera_trust_manager_test.pywith Black for consistent code style ([Good First Issue]: format black tests/unit/hedera_trust_manager_test.py #1539)tests/unit/batch_transaction_test.pywith Black.(#1520)tests/unit/prng_transaction_test.pywith black ([Good First Issue]: format black tests/unit/prng_transaction_test.py #1546)tests/unit/node*.pywith Black for consistent code style ([Good First Issue]: format black tests/unit/node*.py #1545)ethereum_transaction_test.pyusing Black.tests/unit/custom_fee_test.pywith black for code style consistency. ([Good First Issue]: format black tests/unit/custom_fee_test.py #1525)intandHbarinputscrypto_utils(Create tests/unit/crypto_utils_test.py #993).coderabbit.yaml.key_utils_test.py,test_key_format.py,test_key_list.py) using the black formatter__str__method and tests with additional coverage, and update the format_key function inkey_format.pyto handle objects with a _to_proto method.ResponseCode.get_name(receipt.status)with theResponseCode(receipt.status).nameacross examples and integration tests for consistency. (Replace ResponseCode.get_name(receipt.status) #1136)AccountCreateTransaction.set_key()usage withset_key_without_alias()andset_key_with_alias()across examples and teststests/unit/node_address_test.pymock_server.pytests/unit/topic_info_query_test.py(Increase test coverage rate for #1124)TransactionIdclass, covering parsing logic, hashing, and scheduled transactions.key_format.pyto improve coverage.SubscriptionHandleclass covering cancellation state, thread management, and join operations.Packages
pyproject.tomlto enforce stricter Ruff linting rules, including Google-style docstrings (D), import sorting (I), and modern Python syntax (UP).AUTO - GENERATED - What's Changed
_Executableclass by @MonaaEid in feat: add comprehensive training documentation for_Executableclass #1024in_tinybarsparameter by @MonaaEid in refactor: remove deprecatedin_tinybarsparameter #1188include_duplicatesin TransactionGetReceiptQuery #1166) by @HusseinYasser in feat: added the support for the include dups for tx receipt query (#1166) #1186issue reminder botby @drtoxic69 in feat: add explicit assignees mention toissue reminder bot#1239HBARunit examples and update transfer transaction by @drtoxic69 in feat: addHBARunit examples and update transfer transaction #1259NodeAddresstests with additional coverage by @MonaaEid in test: enhanceNodeAddresstests with additional coverage #1302TopicInfotest coverage by @MonaaEid in test: enhanceTopicInfotest coverage #1445AccountIdfunctionality and improve alias handling by @manishdait in feat: ExtendAccountIdfunctionality and improve alias handling #1009node_account_idsduring external signing and manual freezing by @manishdait in fix: Transaction byte generation for validnode_account_idsduring external signing and manual freezing #1226.github/scripts/bot-advanced-check.shto unassign unqualified users by @MonaaEid in fix: update.github/scripts/bot-advanced-check.shto unassign unqualified users #1602black tests/unit/nft_id_test.pywith Black. by @AkshayKumarSahu in chore: formatblack tests/unit/nft_id_test.pywith Black. #1641grpc_deadlineandrequest_timeoutsupport for transaction and query execution by @manishdait in feat: Addedgrpc_deadlineandrequest_timeoutsupport for transaction and query execution #1499ContractIdnum value using MirrorNode query by @manishdait in feat: Add support for populatingContractIdnum value using MirrorNode query #1565execute()implementations by @manishdait in https://github.com/hiero-ledger/hiero-sdk-python/pull/1736__repr__Method forFileIdClass #1628) by @Subhrasameerdash in https://github.com/hiero-ledger/hiero-sdk-python/pull/1770New Contributors
black tests/unit/nft_id_test.pywith Black. #1641Full Changelog: v0.1.10...v0.2.0
This discussion was created from the release v0.2.0.
Beta Was this translation helpful? Give feedback.
All reactions