net
APIs used to query network configuration.
The namespace net
provides functions related to the Klaytn networks.
net_networkID
Returns the network identifier (network ID).
Parameters
None
Return Value
Type | Description |
---|---|
QUANTITY | The integer of the network identifier.
- |
Example
net_listening
Returns true
if the client is actively listening for network connections.
Parameters
None
Return Value
Type | Description |
---|---|
Boolean |
|
Example
net_peerCount
Returns the number of peers currently connected to the client.
Parameters
None
Return Value
Type | Description |
---|---|
QUANTITY | Integer of the number of connected peers. |
Example
net_peerCountByType
Returns the number of connected nodes by type and the total number of connected nodes with key/value pairs.
Parameters
None
Return Value
Type | Description |
---|---|
JSON string | The number of connected peers by type as well as the total number of connected peers. |
Example
net_version
Return the current klaytn protocol version.
Parameters
None
Return Value
Type | Description |
---|---|
QUANTITY | The integer of the klaytn protocol version.
- |
Example
Last updated