1+ """
2+ hiero_sdk_python.transaction.token_wipe_transaction
3+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4+
5+ Provides TokenWipeTransaction, a subclass of Transaction for wiping fungible tokens and NFTs
6+ from accounts on the Hedera network via the Hedera Token Service (HTS) API.
7+ """
18from typing import Optional , List
29from hiero_sdk_python .tokens .token_id import TokenId
310from hiero_sdk_python .account .account_id import AccountId
@@ -19,8 +26,8 @@ class TokenWipeTransaction(Transaction):
1926 def __init__ (
2027 self ,
2128 token_id : Optional [TokenId ] = None ,
22- account_id : Optional [AccountId ] = None ,
23- amount : Optional [int ] = None ,
29+ account_id : Optional [AccountId ] = None ,
30+ amount : Optional [int ] = None ,
2431 serial : Optional [List [int ]] = None
2532 ) -> None :
2633 """
@@ -37,7 +44,7 @@ def __init__(
3744 self .account_id : Optional [AccountId ] = account_id
3845 self .amount : Optional [int ] = amount
3946 self .serial : List [int ] = serial if serial else []
40-
47+
4148 def set_token_id (self , token_id : TokenId ) -> "TokenWipeTransaction" :
4249 """
4350 Sets the ID of the token to be wiped.
@@ -51,7 +58,7 @@ def set_token_id(self, token_id: TokenId) -> "TokenWipeTransaction":
5158 self ._require_not_frozen ()
5259 self .token_id = token_id
5360 return self
54-
61+
5562 def set_account_id (self , account_id : AccountId ) -> "TokenWipeTransaction" :
5663 """
5764 Sets the ID of the account to have their tokens wiped.
@@ -65,7 +72,7 @@ def set_account_id(self, account_id: AccountId) -> "TokenWipeTransaction":
6572 self ._require_not_frozen ()
6673 self .account_id = account_id
6774 return self
68-
75+
6976 def set_amount (self , amount : int ) -> "TokenWipeTransaction" :
7077 """
7178 Sets the amount of tokens to wipe.
@@ -79,7 +86,7 @@ def set_amount(self, amount: int) -> "TokenWipeTransaction":
7986 self ._require_not_frozen ()
8087 self .amount = amount
8188 return self
82-
89+
8390 def set_serial (self , serial : List [int ]) -> "TokenWipeTransaction" :
8491 """
8592 Sets the serial numbers of NFTs to wipe.
@@ -93,7 +100,7 @@ def set_serial(self, serial: List[int]) -> "TokenWipeTransaction":
93100 self ._require_not_frozen ()
94101 self .serial = serial
95102 return self
96-
103+
97104 def build_transaction_body (self ) -> transaction_body_pb2 .TransactionBody :
98105 """
99106 Builds and returns the protobuf transaction body for token wipe.
@@ -110,13 +117,13 @@ def build_transaction_body(self) -> transaction_body_pb2.TransactionBody:
110117 transaction_body : transaction_body_pb2 .TransactionBody = self .build_base_transaction_body ()
111118 transaction_body .tokenWipe .CopyFrom (token_wipe_body )
112119 return transaction_body
113-
120+
114121 def _get_method (self , channel : _Channel ) -> _Method :
115122 return _Method (
116123 transaction_func = channel .token .wipeTokenAccount ,
117124 query_func = None
118125 )
119-
126+
120127 def _from_proto (self , proto : TokenWipeAccountTransactionBody ) -> "TokenWipeTransaction" :
121128 """
122129 Deserializes a TokenWipeAccountTransactionBody from a protobuf object.
@@ -131,4 +138,4 @@ def _from_proto(self, proto: TokenWipeAccountTransactionBody) -> "TokenWipeTrans
131138 self .account_id = AccountId ._from_proto (proto .account )
132139 self .amount = proto .amount
133140 self .serial = proto .serialNumbers
134- return self
141+ return self
0 commit comments