Show / Hide Table of Contents

Class TopicMessageDataExtensions

Extension methods for querying topic message data from the mirror node.

Inheritance
object
TopicMessageDataExtensions
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 TopicMessageDataExtensions

Methods

| Edit this page View Source

GetTopicMessageAsync(MirrorRestClient, ConsensusTimeStamp)

Retrieves a topic message by its consensus timestamp, without needing to know the topic id — useful for forensic lookups starting from a consensus instant recorded elsewhere (e.g., transaction records, block history).

Declaration
public static Task<TopicMessageData?> GetTopicMessageAsync(this MirrorRestClient client, ConsensusTimeStamp consensus)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

ConsensusTimeStamp consensus

The consensus timestamp identifying the message.

Returns
Type Description
Task<TopicMessageData>

The topic message information or null if not found.

| Edit this page View Source

GetTopicMessageAsync(MirrorRestClient, EntityId, ulong)

Retrieves a single topic message by topic id and in-stream sequence number via /api/v1/topics/{topicId}/messages/{sequenceNumber}. Use the GetTopicMessageAsync(MirrorRestClient, ConsensusTimeStamp) overload when the consensus timestamp is known but the topic id is not.

Declaration
public static Task<TopicMessageData?> GetTopicMessageAsync(this MirrorRestClient client, EntityId topic, ulong sequenceNumber)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

EntityId topic

The topic to retrieve the message from.

ulong sequenceNumber

The sequence number of the message within the topic stream to retrieve.

Returns
Type Description
Task<TopicMessageData>

The topic message information or null if not found.

| Edit this page View Source

GetTopicMessagesAsync(MirrorRestClient, EntityId, params IMirrorQueryParameter[])

Retrieves a list of topic messages. Messages may be filtered by a starting sequence number or consensus timestamp.

Declaration
public static IAsyncEnumerable<TopicMessageData> GetTopicMessagesAsync(this MirrorRestClient client, EntityId topic, params IMirrorQueryParameter[] filters)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

EntityId topic

The topic id of the message stream.

IMirrorQueryParameter[] filters

Additional query filters if desired.

Returns
Type Description
IAsyncEnumerable<TopicMessageData>

An enumerable of topic messages meeting the given criteria, may be empty if none are found.

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