Optimism
Optimism
Optimism
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
net_peerCount returns the number of peers currently connected to an OP Mainnet node — the OP Stack rollup that settles to Ethereum L1 and uses ETH for gas — as a hex-encoded integer (for example "0x1a" for 26 peers). It is a quick way to gauge how well a node is wired into the network's gossip layer for block and transaction propagation. Send the request to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa) and decode the hex value to a decimal count.
Este método não aceita parâmetros. Passe um array vazio [].
| Tipo | Descrição |
|---|---|
| string | Hex-encoded peer count, e.g. `"0x1a"` = 26 peers. |
Try it live in the Optimism playground.
optimism.therpc.io returns the peer count of whichever backend node serves the request, not a figure tied to your account or session.