getNodeInfo method

Future<DefaultNodeInfo> getNodeInfo()

Queries the node info of the chain based on the given lcdEndpoint.

Implementation

Future<DefaultNodeInfo> getNodeInfo() async {
  final request = tendermint.GetNodeInfoRequest();

  final response = await _client.getNodeInfo(request);
  if (!response.hasDefaultNodeInfo()) {
    throw Exception('Invalid node info response');
  }

  return response.defaultNodeInfo;
}