66Provides methods to retrieve the receipt and access core transaction details.
77"""
88from typing import Optional , Union
9+ from typing import TYPE_CHECKING
10+
911from hiero_sdk_python .account .account_id import AccountId
1012from hiero_sdk_python .client .client import Client
1113from hiero_sdk_python .transaction .transaction_id import TransactionId
14+ from hiero_sdk_python .transaction .transaction_receipt import TransactionReceipt
15+ from hiero_sdk_python .transaction .transaction_record import TransactionRecord
16+
17+ if TYPE_CHECKING :
18+ from hiero_sdk_python .transaction .transaction import Transaction
19+
1220# pylint: disable=too-few-public-methods
1321
1422class TransactionResponse :
@@ -20,11 +28,11 @@ def __init__(self) -> None:
2028 """
2129 Initialize a new TransactionResponse instance with default values.
2230 """
23- self .transaction_id = TransactionId ()
31+ self .transaction_id : TransactionId = TransactionId ()
2432 self .node_id : AccountId = AccountId ()
2533 self .hash : bytes = bytes ()
2634 self .validate_status : bool = False
27- self .transaction = None
35+ self .transaction : Optional [ "Transaction" ] = None
2836
2937 def get_receipt_query (self ):
3038 """
@@ -40,7 +48,7 @@ def get_receipt_query(self):
4048 .set_node_account_id (self .node_id )
4149 )
4250
43- def get_receipt (self , client : "Client" , timeout : Optional [Union [int , float ]] = None ):
51+ def get_receipt (self , client : "Client" , timeout : Optional [Union [int , float ]] = None ) -> "TransactionReceipt" :
4452 """
4553 Retrieves the receipt for this transaction from the network.
4654
@@ -69,7 +77,7 @@ def get_record_query(self):
6977 .set_node_account_ids ([self .node_id ])
7078 )
7179
72- def get_record (self , client : "Client" , timeout : Optional [Union [int , float ]] = None ):
80+ def get_record (self , client : "Client" , timeout : Optional [Union [int , float ]] = None ) -> "TransactionRecord" :
7381 """
7482 Retrieve the transaction record from the Hedera network.
7583
0 commit comments