getVersion method
get Version by rpc node
Implementation
Future<RPCResponse<GetVersion>> getVersion() async {
final body = json.encode({
"jsonrpc": "2.0",
"id": 1,
"method": RPCMethod.getVersion,
});
final response = await _httpClient.post(_url, data: body);
return RPCResponse<GetVersion>.fromJson(
response.data,
onData: (Map<String, dynamic> value) {
return GetVersion.fromJson(value);
},
);
}