For the complete documentation index, see llms.txt. This page is also available as Markdown.

local_node_info - Nervos

Example code for the local_node_info JSON-RPC method. Complete guide on how to use local_node_info JSON-RPC in GetBlock Web3 documentation.

Returns information about the local node — node ID, version, listen addresses, peer connection counts.

Parameters

  • None

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "local_node_info",
    "params": [],
    "id": "getblock.io"
}'
import axios from 'axios';

const data = JSON.stringify({
    "jsonrpc": "2.0",
    "method": "local_node_info",
    "params": [],
    "id": "getblock.io"
});

const config = {
    method: 'post',
    url: 'https://go.getblock.io/<ACCESS-TOKEN>/',
    headers: {
        'Content-Type': 'application/json'
    },
    data: data
};

axios(config)
    .then(response => console.log(JSON.stringify(response.data, null, 2)))
    .catch(error => console.log(error));

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "active": true,
        "addresses": [
            {
                "address": "/ip4/0.0.0.0/tcp/8115/p2p/QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS",
                "score": "0xff"
            }
        ],
        "connections": "0x14",
        "node_id": "QmUsZHPbjjzU627UZFt4k8j6ycEcNvXRnVGxCPKqwbAfQS",
        "protocols": [
            {
                "id": "0x0",
                "name": "/ckb/ping",
                "support_versions": [
                    "0.0.1"
                ]
            }
        ],
        "version": "0.117.0 (a0ff732 2026-02-15)"
    }
}

Response Parameters

Field
Type
Description

result.node_id

string

Peer ID of the local node

result.version

string

CKB software version

result.active

boolean

Whether the node is participating in the P2P network

result.addresses

array of NodeAddress

Node's listen addresses

result.connections

Uint64

Number of currently connected peers

result.protocols

array of LocalNodeProtocol

P2P protocols supported by this node

Use Cases

  • Node identity verification

  • P2P health checks

  • Capability detection in multi-provider environments

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32601

Method not found

Method does not exist or is not enabled on this node

-32603

Internal error

Server-side error while processing the request

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Was this helpful?