getNetwork method
General info about the currently configured network. See: https://developers.stellar.org/network/soroban-rpc/api-reference/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);
}