curl --request POST \
--url https://rpc.testnet.tempo.xyz/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": true
}curl --request POST \
--url https://rpc.testnet.tempo.xyz/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": true
}true if the client is actively listening for network connections.
result — true if the client is listening, false otherwisenet_listening code examplesconst ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);
const checkListening = async () => {
const listening = await provider.send("net_listening", []);
console.log(`Node is listening: ${listening}`);
};
checkListening();
Was this page helpful?