{% code overflow="wrap" lineNumbers="true" %}
// yarn add @tatumio/tatum
import { TatumSDK, Solana, Network } from '@tatumio/tatum'
const tatum = await TatumSDK.init<Solana>({ network: Network.SOLANA })
const res = await tatum.rpc.getVersion()
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
{% endcode %}
The getVersion
method is used to retrieve the current Solana version running on the node. This information can be useful for troubleshooting, compatibility checks, or for understanding the node's capabilities based on its version.
{% embed url="https://codepen.io/tatum-devrel/pen/vYQPXVV" %}
This method does not require any parameters.
The result field will be a JSON object with the following fields:
solana-core
: The software version ofsolana-core
.feature-set
: The unique identifier of the current software's feature set.
jsonCopy code{
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion"
}
jsonCopy code{
"jsonrpc": "2.0",
"result": {
"solana-core": "1.15.0"
},
"id": 1
}