getVersionInfo
Version information about the RPC and Captive core. RPC manages its own, pared-down version of Stellar Core optimized for its own subset of needs. we'll refer to this as a "Captive Core" instance.
Params
(0)Result
(getVersionInfoResult)The version of the RPC server.
The commit hash of the RPC server.
The build timestamp of the RPC server.
The version of the Captive Core.
The protocol version.
Example
Example request to the getVersionInfo
method
Request
- cURL
- JavaScript
- Python
- JSON
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 8675309,
"method": "getVersionInfo"
}' \
https://soroban-testnet.stellar.org | jq
let requestBody = {
"jsonrpc": "2.0",
"id": 8675309,
"method": "getVersionInfo"
}
let res = await fetch('https://soroban-testnet.stellar.org', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(requestBody),
})
let json = await res.json()
console.log(json)
import json, requests
res = requests.post(https://soroban-testnet.stellar.org, json={
"jsonrpc": "2.0",
"id": 8675309,
"method": "getVersionInfo"
})
print(json.dumps(res.json(), indent=4))
{
"jsonrpc": "2.0",
"id": 8675309,
"method": "getVersionInfo"
}
Result
{
"jsonrpc": "2.0",
"id": 8675309,
"result": {
"version": "21.1.0",
"commit_hash": "fcd2f0523f04279bae4502f3e3fa00ca627e6f6a",
"build_time_stamp": "2024-05-10T11:18:38",
"captive_core_version": "stellar-core 21.0.0.rc2 (c6f474133738ae5f6d11b07963ca841909210273)",
"protocol_version": 21
}
}
Usar el Laboratorio
El método getVersionInfo
proporciona detalles de versión sobre el servicio RPC y su Captive Core subyacente, una versión reducida y embebida de Stellar Core optimizada específicamente para operaciones de RPC de Soroban.
Esto es útil para depuración, admitir o asegurar la compatibilidad entre diferentes componentes en tus entornos de desarrollo o producción.
👉 Ver Información de Versión en el Laboratorio