Skip to content

Commit

Permalink
Soroban RPC: Add document for getVersionInfo RPC (#661)
Browse files Browse the repository at this point in the history
* Add document for getVersionInfo RPC

* update info

* Add captive core info
  • Loading branch information
psheth9 committed Jun 7, 2024
1 parent 077745d commit 6d8a6cc
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 0 deletions.
8 changes: 8 additions & 0 deletions network/soroban-rpc/api-reference/methods/getVersionInfo.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
hide_title: true
description: Returns version information
---

import { RpcMethod } from "@site/src/components/RpcMethod";

<RpcMethod method="getVersionInfo" platform="soroban" />
63 changes: 63 additions & 0 deletions openrpc/src/methods/getVersionInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "getVersionInfo",
"summary": "returns version information of RPC and Captive Core",
"description": "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.",
"externalDocs": {
"url": "https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getVersionInfo"
},
"paramStructure": "by-name",
"params": [],
"result": {
"name": "getVersionInfoResult",
"schema": {
"type": "object",
"properties": {

"version": {
"type": "string",
"description": "The version of the RPC server.",
"example": "21.1.0"
},
"commit_hash": {
"type": "string",
"description": "The commit hash of the RPC server.",
"example": "fcd2f0523f04279bae4502f3e3fa00ca627e6f6a"
},
"build_time_stamp": {
"type": "string",
"description": "The build timestamp of the RPC server.",
"example": "2024-05-10T11:18:38"
},
"captive_core_version": {
"type": "string",
"description": "The version of the Captive Core.",
"example": "stellar-core 21.0.0.rc2 (c6f474133738ae5f6d11b07963ca841909210273)"
},
"protocol_version": {
"type": "integer",
"description": "The protocol version.",
"example": 21
}

},
"required": ["version", "commit_hash", "build_time_stamp", "captive_core_version", "protocol_version"]
}
},
"examples": [
{
"name": "Version information of RPC",
"description": "Example request to the `getVersionInfo` method",
"params": [],
"result": {
"name": "getVersionInfoResult",
"value": {
"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
}
}
}
]
}
65 changes: 65 additions & 0 deletions static/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,71 @@
}
]
},

{
"name": "getVersionInfo",
"summary": "returns version information of RPC and Captive Core",
"description": "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.",
"externalDocs": {
"url": "https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getVersionInfo"
},
"paramStructure": "by-name",
"params": [],
"result": {
"name": "getVersionInfoResult",
"schema": {
"type": "object",
"properties": {

"version": {
"type": "string",
"description": "The version of the RPC server.",
"example": "21.1.0"
},
"commit_hash": {
"type": "string",
"description": "The commit hash of the RPC server.",
"example": "fcd2f0523f04279bae4502f3e3fa00ca627e6f6a"
},
"build_time_stamp": {
"type": "string",
"description": "The build timestamp of the RPC server.",
"example": "2024-05-10T11:18:38"
},
"captive_core_version": {
"type": "string",
"description": "The version of the Captive Core.",
"example": "stellar-core 21.0.0.rc2 (c6f474133738ae5f6d11b07963ca841909210273)"
},
"protocol_version": {
"type": "integer",
"description": "The protocol version.",
"example": 21
}

},
"required": ["version", "commit_hash", "build_time_stamp", "captive_core_version", "protocol_version"]
}
},
"examples": [
{
"name": "Version information of RPC",
"description": "Example request to the `getVersionInfo` method",
"params": [],
"result": {
"name": "getVersionInfoResult",
"value": {
"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
}
}
}
]
},

{
"name": "getTransaction",
"summary": "returns transaction details",
Expand Down

0 comments on commit 6d8a6cc

Please sign in to comment.