/// <summary> /// Gets the balances. /// </summary> /// <param name="addresses">The addresses.</param> /// <param name="threshold">The threshold.</param> /// <returns> It returns the confirmed balance which a list of addresses have at the latest confirmed milestone. /// In addition to the balances, it also returns the milestone as well as the index with which the confirmed balance was determined. /// The balances is returned as a list in the same order as the addresses were provided as input.</returns> public GetBalancesResponse GetBalances(List <string> addresses, long threshold) { List <string> addressesWithoutChecksum = new List <string>(); foreach (var address in addresses) { string address0 = address.RemoveChecksum(); addressesWithoutChecksum.Add(address0); } GetBalancesRequest getBalancesRequest = new GetBalancesRequest(addressesWithoutChecksum, threshold); return(_genericIotaCoreApi.Request <GetBalancesRequest, GetBalancesResponse>(getBalancesRequest)); }
/// <summary> /// Gets the balances. /// </summary> /// <param name="addresses">The addresses.</param> /// <param name="threshold">The threshold.</param> /// <returns> It returns the confirmed balance which a list of addresses have at the latest confirmed milestone. /// In addition to the balances, it also returns the milestone as well as the index with which the confirmed balance was determined. /// The balances is returned as a list in the same order as the addresses were provided as input.</returns> public GetBalancesResponse GetBalances(List <string> addresses, long threshold = 100) { GetBalancesRequest getBalancesRequest = new GetBalancesRequest(addresses, threshold); return(_genericIotaCoreApi.Request <GetBalancesRequest, GetBalancesResponse>(getBalancesRequest)); }