Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsPlasmaJSON-RPC APINetwork Methods

web3_clientVersion - Plasma RPC Method

Get the client software version of your Plasma node. Essential for compatibility checks, fleet monitoring, and debugging client-specific behavior.

Plasma RPC endpoint: endpoint URLs, plans and pricing.

Returns the current client software version string for your Plasma node, including the client name, version number, OS, and runtime.

Why Plasma? Build on an EVM Layer 1 for stablecoin payments with PlasmaBFT consensus and Reth execution with 1 second blocks, XPL gas, full EVM JSON-RPC, and debug plus txpool on Dwellir.

When to Use This Method

web3_clientVersion is valuable for payment app developers, wallet teams, and teams shipping Solidity contracts for dollar transfers:

  • Client Compatibility Checks - Verify the node runs a client version that supports the RPC methods your application needs
  • Fleet Version Monitoring - Track client versions across a multi-node infrastructure to coordinate upgrades
  • Debugging Client-Specific Behavior - Identify which client (Geth, Erigon, Nethermind, Besu, etc.) is serving requests when behavior differs
  • Security Auditing - Detect nodes running outdated versions with known vulnerabilities
JSON-RPC request
{
  "jsonrpc": "2.0",
  "method": "web3_clientVersion",
  "params": [],
  "id": 1
}

Code Examples

Common Use Cases

1. Client Version Parser

Parse the version string to extract structured information:

JavaScript
function parseClientVersion(versionString) {
  const parts = versionString.split('/');

  return {
    client: parts[0],
    version: parts[1] || 'unknown',
    os: parts[2] || 'unknown',
    runtime: parts[3] || 'unknown'
  };
}

async function getNodeInfo(provider) {
  const version = await provider.send('web3_clientVersion', []);
  const parsed = parseClientVersion(version);

  console.log(`Client: ${parsed.client}`);
  console.log(`Version: ${parsed.version}`);
  console.log(`OS: ${parsed.os}`);
  console.log(`Runtime: ${parsed.runtime}`);

  return parsed;
}

2. Fleet Version Audit

Check all nodes in a fleet and report version inconsistencies:

Python
import requests

def audit_fleet_versions(endpoints):
    versions = {}
    for endpoint in endpoints:
        try:
            response = requests.post(
                endpoint,
                json={'jsonrpc': '2.0', 'method': 'web3_clientVersion', 'params': [], 'id': 1},
                timeout=5
            )
            version = response.json()['result']
            versions[endpoint] = version
        except Exception as e:
            versions[endpoint] = f'ERROR: {e}'

    # Group by client version
    grouped = {}
    for endpoint, version in versions.items():
        grouped.setdefault(version, []).append(endpoint)

    for version, nodes in grouped.items():
        print(f'{version}: {len(nodes)} node(s)')

    if len(grouped) > 1:
        print('WARNING: Inconsistent versions detected across fleet')

    return versions

3. Feature Detection by Client

Adjust RPC behavior based on the detected client type:

JavaScript
async function detectClientCapabilities(provider) {
  const version = await provider.send('web3_clientVersion', []);
  const client = version.split('/')[0].toLowerCase();

  const capabilities = {
    supportsDebugTrace: ['geth', 'erigon'].includes(client),
    supportsParityTrace: ['openethereum', 'nethermind', 'erigon'].includes(client),
    supportsEthSubscribe: true, // all modern clients
  };

  console.log(`Client "${client}" capabilities:`, capabilities);
  return capabilities;
}

Best Practices

  • Parse the client version string at startup and log it for debugging -- different clients may handle edge cases differently
  • Maintain a fleet inventory that tracks client versions and flags nodes running outdated software
  • When reporting issues to node providers, always include the web3_clientVersion output
  • Some clients expose additional features based on version -- check version strings for feature gates (e.g., Erigon 3.x supports ots_* namespace)
  • The version string format varies across clients -- avoid hardcoding assumptions about the delimiter or field count

Error Handling

Error CodeDescriptionSolution
-32603Internal errorNode may be starting up - retry after delay
-32005Rate limit exceededReduce polling frequency or implement backoff
-32601Method not foundThe web3 namespace may be disabled - check node startup flags

Related Methods

  • net_version - Get the network ID
  • eth_syncing - Check node sync progress
  • web3_sha3 - Compute Keccak-256 hash via RPC
  • net_peerCount - Get number of connected peers

net_peerCount

Get the number of peers connected to your Plasma node. Essential for network health monitoring, peer discovery verification, and load balancer decisions.

web3_sha3

Compute the Keccak-256 hash of given data on Plasma. Useful for hash verification, smart contract development, and data integrity checks.

On this page

When to Use This MethodCode ExamplesCommon Use Cases1. Client Version Parser2. Fleet Version Audit3. Feature Detection by ClientBest PracticesError HandlingRelated Methods