Show / Hide Table of Contents

Class TransactionTimestampDataExtensions

Extension methods for retrieving the latest consensus timestamp from the mirror node.

Inheritance
object
TransactionTimestampDataExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class TransactionTimestampDataExtensions

Methods

| Edit this page View Source

GetLatestConsensusTimestampAsync(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).

  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph