Skip to content

Commit 87adced

Browse files
committed
feat: added topic_sequence_number and topic_running_hash property to tx receipt
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
1 parent d90cf04 commit 87adced

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/hiero_sdk_python/transaction/transaction_receipt.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,29 @@ def node_id(self):
183183
int: The node ID if present; otherwise, 0.
184184
"""
185185
return self._receipt_proto.node_id
186+
187+
@property
188+
def topic_sequence_number(self) -> int:
189+
"""
190+
Returns the topic sequence number associated with this receipt.
191+
192+
Returns:
193+
int: The sequence number of the topic if present, otherwise 0.
194+
"""
195+
return self._receipt_proto.topicSequenceNumber
196+
197+
@property
198+
def topic_running_hash(self) -> Optional[bytes]:
199+
"""
200+
Returns the topic running hash associated with this receipt.
201+
202+
Returns:
203+
int: The running hash of the topic if present, otherwise None.
204+
"""
205+
if self._receipt_proto.HasField('topicRunningHash'):
206+
return self._receipt_proto.topicRunningHash
207+
208+
return None
186209

187210
def _to_proto(self):
188211
"""

0 commit comments

Comments
 (0)