Docs
Supported ChainsManta PacificJSON-RPC APINetwork Methods

net_peerCount - Manta RPC Method

Get number of connected peers on Manta Pacific.

Returns number of peers currently connected to Manta Pacific client.

Request Parameters

Request

This method accepts no parameters.

Response Body

Response
resultQUANTITY

Number of connected peers (hexadecimal)

Code Examples

Bash
curl -X POST https://api-manta-pacific-archive.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "net_peerCount",
    "params": [],
    "id": 1
  }'
JavaScript
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider('https://api-manta-pacific-archive.n.dwellir.com/YOUR_API_KEY');

const peerCount = await provider.send('net_peerCount', []);
console.log('Peer count:', parseInt(peerCount, 16));

On this page