public async Task <BigInteger> GetEthBalance(string address)
        {
            var response = await _ethereumSamuraiApi.ApiBalanceGetBalanceByAddressGetAsync(address);

            var balanceResponse = response as BalanceResponse;

            ThrowOnError(response);
            BigInteger balance = BigInteger.Parse(balanceResponse.Amount);

            return(balance);
        }
Example #2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='address'>
 /// </param>
 public static object ApiBalanceGetBalanceByAddressGet(this IEthereumSamuraiAPI operations, string address)
 {
     return(operations.ApiBalanceGetBalanceByAddressGetAsync(address).GetAwaiter().GetResult());
 }