netPeerCount method

Future<int?> netPeerCount()

Net peer count,

Implementation

Future<int?> netPeerCount() async {
  const method = EthereumRpcMethods.netPeerCount;
  final dynamic res = await _client.rpcClient.request(method);
  if (res != null && res.containsKey(EthereumConstants.ethResultKey)) {
    return EthereumUtilities.hexToInt(res[EthereumConstants.ethResultKey]);
  }
  _client.processError(method, res);
  return null;
}