getBalance method

Future<String> getBalance(
  1. Bip32 key
)

Implementation

Future<String> getBalance(Bip32 key) async {
  final ethPrivateKey = EthPrivateKey.fromHex(HEX.encode(key.privateKey!));
  final balance = await _web3Client.getBalance(ethPrivateKey.address);
  return Future.value(balance.getInWei.toString());
}