# system_version - Centrifuge RPC Method

Returns the node implementation version string on Centrifuge. This version reflects the client software version (e.g., `0.9.43-ba6af1743a0`), not the on-chain runtime version.

> **Why Centrifuge?** Build on the RWA tokenization platform bridging traditional finance with $1B+ Janus Henderson backing with ERC-7540 RWA standards, multichain via Wormhole, 97% securitization cost savings, and BlockTower $220M fund integration.

## When to Use This Method

`system_version` is essential for institutional RWA developers, asset managers, and teams tokenizing real-world assets:

- **Compatibility Checking** -- Verify the node client version supports the features your application requires on Centrifuge
- **Upgrade Monitoring** -- Track node software versions across your validator or collator fleet after runtime upgrades
- **Diagnostics and Debugging** -- Include version information in bug reports and support requests for tokenized treasury funds, SME invoice financing, and institutional-grade RWA infrastructure
- **Multi-Node Management** -- Ensure all nodes in your infrastructure are running consistent versions

## Best Practices

- Check the runtime version before using version-specific Substrate APIs
- Track version changes during runtime upgrades to detect compatibility issues
- Use with `system_chain` and `system_properties` for full network context
- Different nodes on the same network should return the same version (unless upgrading)

## Request Parameters

This method accepts no parameters.

## Request Example

```json
{
  "jsonrpc": "2.0",
  "method": "system_version",
  "params": [],
  "id": 1
}
```

## Response Fields

- `result` (`String, required`): The node implementation version string (e.g., "0.9.43-ba6af1743a0")

## Successful Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0.9.43-ba6af1743a0"
}
```

## Error Responses

### Error Response

- Code: `-32603`

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32603,
    "message": "Internal error"
  }
}
```

## Code Examples

cURL
JavaScript
Python
Rust

```bash
curl -X POST https://api-centrifuge.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "system_version",
    "params": [],
    "id": 1
  }'
```

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

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

const version = await api.rpc.system.version();
console.log('Centrifuge node version:', version.toString());

await api.disconnect();

// Using fetch (HTTP JSON-RPC)
const response = await fetch('https://api-centrifuge.n.dwellir.com/YOUR_API_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'system_version',
    params: [],
    id: 1
  })
});

const { result } = await response.json();
console.log('Centrifuge node version:', result);
```

```python
import requests

def get_system_version():
    response = requests.post(
        'https://api-centrifuge.n.dwellir.com/YOUR_API_KEY',
        json={
            'jsonrpc': '2.0',
            'method': 'system_version',
            'params': [],
            'id': 1
        }
    )
    return response.json()['result']

version = get_system_version()
print(f'Centrifuge node version: {version}')

# Using substrate-interface
from substrateinterface import SubstrateInterface

substrate = SubstrateInterface(url='wss://api-centrifuge.n.dwellir.com/YOUR_API_KEY')
version = substrate.rpc_request('system_version', [])['result']
print(f'Centrifuge node version: {version}')
```

```rust
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::new();
    let response = client
        .post("https://api-centrifuge.n.dwellir.com/YOUR_API_KEY")
        .json(&json!({
            "jsonrpc": "2.0",
            "method": "system_version",
            "params": [],
            "id": 1
        }))
        .send()
        .await?;

    let result: serde_json::Value = response.json().await?;
    println!("Centrifuge node version: {}", result["result"]);
    Ok(())
}
```

## Common Use Cases

### 1. Node Fleet Version Monitoring

Track version consistency across multiple Centrifuge nodes:

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

async function checkFleetVersions(endpoints) {
  const versions = await Promise.all(
    endpoints.map(async (endpoint) => {
      const provider = new WsProvider(endpoint);
      const api = await ApiPromise.create({ provider });
      const version = await api.rpc.system.version();
      const name = await api.rpc.system.name();
      await api.disconnect();
      return { endpoint, version: version.toString(), name: name.toString() };
    })
  );

  const unique = new Set(versions.map((v) => v.version));
  if (unique.size > 1) {
    console.warn('Version mismatch detected across fleet!');
  }

  versions.forEach((v) => {
    console.log(`${v.endpoint}: ${v.name} v${v.version}`);
  });
}
```

### 2. Pre-Upgrade Compatibility Check

Verify node version before executing operations:

```javascript
async function ensureMinVersion(api, minVersion) {
  const version = await api.rpc.system.version();
  const versionStr = version.toString();
  const [major, minor, patch] = versionStr.split('-')[0].split('.').map(Number);
  const [minMajor, minMinor, minPatch] = minVersion.split('.').map(Number);

  if (
    major < minMajor ||
    (major === minMajor && minor < minMinor) ||
    (major === minMajor && minor === minMinor && patch < minPatch)
  ) {
    throw new Error(
      `Node version ${versionStr} is below minimum ${minVersion}`
    );
  }

  console.log(`Node version ${versionStr} meets minimum ${minVersion}`);
  return true;
}
```

### 3. Node Identity Dashboard

Gather full node identity information:

```javascript
async function getNodeIdentity(api) {
  const [version, name, chain, properties] = await Promise.all([
    api.rpc.system.version(),
    api.rpc.system.name(),
    api.rpc.system.chain(),
    api.rpc.system.properties()
  ]);

  return {
    client: name.toString(),
    version: version.toString(),
    chain: chain.toString(),
    tokenSymbol: properties.tokenSymbol.toString(),
    ss58Format: properties.ss58Format.toString()
  };
}
```

## Related Methods

- [`system_chain`](https://www.dwellir.com/docs/centrifuge/system_chain) -- Get the chain name
- [`system_name`](https://www.dwellir.com/docs/centrifuge/system_name) -- Get the node implementation name
- [`system_properties`](https://www.dwellir.com/docs/centrifuge/system_properties) -- Get chain properties (token symbol, decimals, SS58 format)
- [`state_getRuntimeVersion`](https://www.dwellir.com/docs/centrifuge/state_getRuntimeVersion) -- Get the on-chain runtime version (spec version, impl version)
- [`rpc_methods`](https://www.dwellir.com/docs/centrifuge/rpc_methods) -- List all available RPC methods
