Show / Hide Table of Contents

Class AccountDataExtensions

Extension methods for querying account data from the mirror node.

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

Methods

| Edit this page View Source

GetAccountAsync(MirrorRestClient, EntityId, params IMirrorQueryParameter[])

Retrieves information about a single account from /api/v1/accounts/{id}. Use TimestampFilter to retrieve the account's state at a historical consensus instant; otherwise returns the current state. The server's inline transaction list is suppressed on the wire (bandwidth optimization, since AccountData does not carry it).

Declaration
public static Task<AccountData?> GetAccountAsync(this MirrorRestClient client, EntityId account, params IMirrorQueryParameter[] filters)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

EntityId account

The id of the account to retrieve.

IMirrorQueryParameter[] filters

Additional query parameters. The endpoint meaningfully supports TimestampFilter for historical state lookup; other parameters the server accepts on this endpoint (limit/order/transactiontype) only affect the inline transaction list, which this SDK suppresses.

Returns
Type Description
Task<AccountData>

An account information object, or null if not found.

Remarks

For the account's transaction listing, call GetTransactionsAsync(AccountFilter.Is(account)).

| Edit this page View Source

GetAccountsAsync(MirrorRestClient, params IMirrorQueryParameter[])

Enumerates accounts across the network. Use AccountFilter to narrow by id, AccountPublicKeyFilter to narrow by root public key, AccountBalanceFilter to narrow by tinybar balance threshold, or BalanceProjectionFilter to control whether the balance subtree is included in each record.

Declaration
public static IAsyncEnumerable<AccountData> GetAccountsAsync(this MirrorRestClient client, params IMirrorQueryParameter[] filters)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

IMirrorQueryParameter[] filters

Additional query parameters. The endpoint supports AccountFilter, AccountPublicKeyFilter, AccountBalanceFilter, BalanceProjectionFilter, PageLimit, and OrderBy.

Returns
Type Description
IAsyncEnumerable<AccountData>

An async enumerable of account records.

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