JSON-RPC API is still evolving and backward compatibility is not guaranteed.
There is no way to know which JSON-RPC version is supported by a given node.
With a starnet_apiVersion
JSON-RPC endpoint, I think it will help SDK builders and developers to create more reliable applications.
Here is my proposal for the endpoint:
{
"name": "starknet_apiVersion",
"summary": "Get JSON RPC API version",
"params": [],
"result": {
"name": "version",
"description": "API version used by provider",
"type": "string"
},
"errors": []
},