Parameters
NoneResponse
quantity— the number of connected peers
quantity — the number of connected peersnet_peerCount code examplesconst { JsonRpcProvider } = require("ethers");
const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");
async function call() {
const result = await provider.send("net_peerCount", []);
console.log(result);
}
call();
Was this page helpful?