Polygon
Polygon
Polygon
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
net_peerCount returns the number of peers currently connected to a Polygon PoS node, encoded as a hex integer (for example "0x1a" for 26 peers). Those peers are the P2P connections the Bor client uses to receive new blocks and broadcast MATIC transactions across the Polygon network. A healthy peer count is a strong signal the node can keep up with Polygon's ~2-second block production. Query it against the Polygon mainnet endpoint at https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89).
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string | Hex-encoded peer count, e.g. `"0x1a"` = 26 peers. |
Try it live in the Polygon playground.