⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

state_getRuntimeVersion

Provides the current runtime version numbers and supported API hashes. Use this to detect when an upgrade occurs so you can refresh metadata, regenerate types, or recompile Wasm bindings.

Parameters

ParameterTypeRequiredDescription
atstringNoOptional block hash for historical runtime versions.

Returns

FieldTypeDescription
result.specNamestringRuntime name (e.g., manta).
result.specVersionnumberRuntime spec version. Increments on logic changes.
result.implVersionnumberImplementation version.
result.transactionVersionnumberTransaction version for extrinsic encoding.
result.apisarraySupported runtime API hashes and versions.

Response Snapshot (2 Oct 2025)

{
"jsonrpc": "2.0",
"result": {
"specName": "manta",
"implName": "manta",
"authoringVersion": 1,
"specVersion": 4730,
"implVersion": 1,
"transactionVersion": 10,
"stateVersion": 1,
"apis": [
["0xdf6acb689907609b", 4],
["0x37e397fc7c91f5e4", 2],
["0xf78b278be53f454c", 2],
["0x2aa62120049dd2d2", 1]
]
},
"id": 1
}

Code Example

import { ApiPromise, WsProvider } from '@polkadot/api';

const provider = new WsProvider('wss://api-manta-atlantic-mainnet.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });

const version = await api.rpc.state.getRuntimeVersion();
console.log(`Runtime ${version.specName.toString()} v${version.specVersion.toNumber()}`);

Operational Tips

  • Watch for specVersion increments to trigger automatic metadata regeneration in your pipelines.
  • Compare transactionVersion when caching signed payloads—if the value changes, rebuild extrinsics.
  • Track API hash changes if you rely on custom runtime APIs such as mantaSBT_* or zenlinkProtocol_*.