Show / Hide Table of Contents

Class GetTokenBalanceExtension

Extends the client functionality to simplify retrieving just the balance of a single token for an account.

Inheritance
Object
GetTokenBalanceExtension
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Hashgraph.Extensions
Assembly: Hashgraph.dll
Syntax
public static class GetTokenBalanceExtension

Methods

| Improve this Doc View Source

GetAccountTokenBalanceAsync(Client, Address, Address, Action<IContext>)

Helper method to retrieve just the balance of a single token for a given address. Under the hood it is calling GetAccountBalancesAsync(Address, Action<IContext>)

Declaration
public static async Task<ulong> GetAccountTokenBalanceAsync(this Client client, Address address, Address token, Action<IContext> configure = null)
Parameters
Type Name Description
Client client

The client

Address address

Address of the account to look up.

Address token

Address of the token to look up (symbol name is not supported)

Action<IContext> configure

Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network.

Returns
Type Description
Task<UInt64>
| Improve this Doc View Source

GetContractTokenBalanceAsync(Client, Address, Address, Action<IContext>)

Helper method to retrieve just the balance of a single token for a given contract. Under the hood it is calling GetContractBalancesAsync(Address, Action<IContext>)

Declaration
public static async Task<ulong> GetContractTokenBalanceAsync(this Client client, Address contract, Address token, Action<IContext> configure = null)
Parameters
Type Name Description
Client client

The client

Address contract

Address of the contract to look up.

Address token

Address of the token to look up (symbol name is not supported)

Action<IContext> configure

Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network.

Returns
Type Description
Task<UInt64>
  • Improve this Doc
  • View Source
In This Article
Back to top .NET Client Library for Hedera Hashgraph