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); }
/// <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()); }