Class GetTokenBalanceExtension
Extends the client functionality to simplify retrieving just the balance of a single token for an account.
Inherited Members
Namespace: Hashgraph.Extensions
Assembly: Hashgraph.dll
Syntax
public static class GetTokenBalanceExtension
Methods
| Improve this Doc View SourceGetAccountTokenBalanceAsync(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> |
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> |