Skip to main content
Plasma API method that returns true if the client is actively listening for network connections.

Parameters

None

Response

  • booleantrue when listening, otherwise false

net_listening code examples

const { JsonRpcProvider } = require("ethers");

const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");

async function call() {
  const result = await provider.send("net_listening", []);
  console.log(result);
}

call();