Class HcsMessageDataExtensions
Extension methods for querying HCS message data from the mirror node.
Inherited Members
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class HcsMessageDataExtensions
Methods
| Edit this page View SourceGetHcsMessageAsync(MirrorRestClient, EntityId, ulong)
Retrieves an HCS message with the given topic and sequence number.
Declaration
public static Task<HcsMessageData?> GetHcsMessageAsync(this MirrorRestClient client, EntityId topic, ulong sequenceNumber)
Parameters
| Type | Name | Description |
|---|---|---|
| MirrorRestClient | client | Mirror Rest Client to use for the request. |
| EntityId | topic | The HCS message topic to retrieve. |
| ulong | sequenceNumber | The sequence number of the message within the topic stream to retrieve. |
Returns
| Type | Description |
|---|---|
| Task<HcsMessageData> | The HCS Message information or null if not found. |
GetHcsMessagesAsync(MirrorRestClient, EntityId, params IMirrorQueryFilter[])
Retrieves a list of HCS messages. Messages may be filtered by a starting sequence number or consensus timestamp.
Declaration
public static IAsyncEnumerable<HcsMessageData> GetHcsMessagesAsync(this MirrorRestClient client, EntityId topic, params IMirrorQueryFilter[] filters)
Parameters
| Type | Name | Description |
|---|---|---|
| MirrorRestClient | client | Mirror Rest Client to use for the request. |
| EntityId | topic | The topic id of the HCS stream. |
| IMirrorQueryFilter[] | filters | Additional query filters if desired. |
Returns
| Type | Description |
|---|---|
| IAsyncEnumerable<HcsMessageData> | An enumerable of HCS Messages meeting the given criteria, may be empty if none are found. |