Returns the current client version.
(data: JsonRpcData<C>)
| 11 | |
| 12 | /// Returns the current client version. |
| 13 | pub async fn client_version<C>(data: JsonRpcData<C>) -> JsonRpcResult<String> |
| 14 | where |
| 15 | C: Client + Sync + Send, |
| 16 | { |
| 17 | let res: abci::response::Info = data |
| 18 | .tm() |
| 19 | .abci_info() |
| 20 | .await |
| 21 | .context("failed to fetch info")?; |
| 22 | |
| 23 | let version = format!("{}/{}/{}", res.data, res.version, res.app_version); |
| 24 | |
| 25 | Ok(version) |
| 26 | } |
| 27 | |
| 28 | /// Returns Keccak-256 (not the standardized SHA3-256) of the given data. |
| 29 | /// |