diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a7e630e6..bd34d47fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Changelog +# Changelog All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org). @@ -7,14 +7,16 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1. ## [Unreleased] ### Added - - Added a notification workflow that alerts the support team when an issue is labeled as a Good First Issue Candidate.[(#1296)] +- Added comprehensive docstring to `TokenType` enum explaining fungible vs non-fungible tokens with use cases and examples. (#1392) - Added comprehensive training documentation for the `Query` class, covering execution flow, payments, retries, and building child queries. (#1238) - Beginner issue documentation and updated GFI and GFIC templates and documentation - Enable auto assignment to good first issues (#1312), archived good first issue support team notification. Changed templates with new assign instruction. - Intermediate issue documentation - Added unit test for 'endpoint.py' to increase coverage. - Automated assignment guard for `advanced` issues; requires completion of at least one `good first issue` and one `intermediate` issue before assignment (exempts maintainers, committers, and triage members). (#1142) +- Added comprehensive docstring to `FeeAssessmentMethod` enum explaining inclusive vs exclusive fee assessment methods. (#1391) +- Added comprehensive docstring to `TokenType` enum explaining fungible vs non-fungible tokens with use cases and examples. (#1392) - Added Hbar object support for TransferTransaction HBAR transfers: - Methods now accept `Union[int, Hbar]` for amount parameters with immediate normalization to tinybars - Includes comprehensive unit tests covering various Hbar units (HBAR, MICROBAR, NANOBAR, TINYBAR) and accumulation behavior with mixed `int` and `Hbar` inputs diff --git a/src/hiero_sdk_python/tokens/fee_assessment_method.py b/src/hiero_sdk_python/tokens/fee_assessment_method.py index ee1145d34..08eebb2c4 100644 --- a/src/hiero_sdk_python/tokens/fee_assessment_method.py +++ b/src/hiero_sdk_python/tokens/fee_assessment_method.py @@ -1,8 +1,23 @@ from enum import Enum class FeeAssessmentMethod(Enum): - """ - Represents the fee assessment method for custom fees. + """Fee assessment method for custom token fees. + + Determines whether custom fees are deducted from the transferred amount + or charged separately. + + Attributes: + INCLUSIVE: Fee is deducted from transferred amount. + The recipient receives the transferred amount minus fee. + EXCLUSIVE: Fee is charged in addition to transferred amount. + The recipient receives the full transferred amount, and the payer + pays the fee on top of that. + + Example: + >>> # Using inclusive fee assessment + >>> assessment = FeeAssessmentMethod.INCLUSIVE + >>> print(f"Fee type: {assessment}") + Fee type: FeeAssessmentMethod.INCLUSIVE """ INCLUSIVE = 0 diff --git a/src/hiero_sdk_python/tokens/token_type.py b/src/hiero_sdk_python/tokens/token_type.py index 7000cd0f5..a58afee32 100644 --- a/src/hiero_sdk_python/tokens/token_type.py +++ b/src/hiero_sdk_python/tokens/token_type.py @@ -9,6 +9,24 @@ from enum import Enum class TokenType(Enum): - """Enum for Hedera token types: FUNGIBLE_COMMON or NON_FUNGIBLE_UNIQUE.""" + """Token type for Hedera tokens. + + Determines whether a token represents a divisible, interchangeable + asset or a collection of unique, non-interchangeable assets. + + Attributes: + FUNGIBLE_COMMON: Interchangeable tokens where each unit is equal. + Examples: cryptocurrencies, utility tokens, stablecoins. + Use for tokens where units can be divided and mixed freely. + NON_FUNGIBLE_UNIQUE: Unique tokens where each token is distinct and + cannot be replaced. Examples: NFTs, digital collectibles, + unique assets. Each token has its own metadata and identity. + + Example: + >>> # Creating a fungible token + >>> token_type = TokenType.FUNGIBLE_COMMON + >>> print(f"Token type: {token_type}") + Token type: TokenType.FUNGIBLE_COMMON + """ FUNGIBLE_COMMON = 0 NON_FUNGIBLE_UNIQUE = 1