Optimism
Optimism
Optimism
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| 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.