getNetwork method

Future<GetNetworkResponse> getNetwork()

General info about the currently configured network. See: https://soroban.stellar.org/api/methods/getNetwork

Implementation

Future<GetNetworkResponse> getNetwork() async {

  JsonRpcMethod getNetwork = JsonRpcMethod("getNetwork");
  dio.Response response = await _dio.post(_serverUrl,
      data: json.encode(getNetwork), options: dio.Options(headers: _headers));
  if (enableLogging) {
    print("getNetwork response: $response");
  }
  return GetNetworkResponse.fromJson(response.data);
}