Class TransactionTimestampDataExtensions
Extension methods for retrieving the latest consensus timestamp from the mirror node.
Inherited Members
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class TransactionTimestampDataExtensions
Methods
| Edit this page View SourceGetLatestConsensusTimestampAsync(MirrorRestClient)
Retrieves the most recent consensus timestamp observed by the
mirror node via
/api/v1/transactions?limit=1&order=desc. There is no
dedicated "now" endpoint on the mirror node; this is the
canonical way to get a current-ish network clock.
Declaration
public static Task<ConsensusTimeStamp> GetLatestConsensusTimestampAsync(this MirrorRestClient client)
Parameters
| Type | Name | Description |
|---|---|---|
| MirrorRestClient | client | Mirror Rest Client to use for the request. |
Returns
| Type | Description |
|---|---|
| Task<ConsensusTimeStamp> | The latest consensus timestamp known by the mirror node, or MinValue if the mirror has no transactions recorded yet (e.g., freshly-started local node). |