post https://api.infstones.com/theta/mainnet/
This API returns the address of connected peers.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
skip_edge_node | ❌ | Boolean | will not return edge nodes if set to true |
"params":[
{
"skip_edge_node":true
}
]
Result
Result Fields
Key | Type | Detail |
---|---|---|
peers | Array | array of peers address |
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"theta.GetPeers","params":[{"skip_edge_node":true}],"id":1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"peers": [
"0xD21E396103e5995eEbA2930F6E3578336660Aef7",
...
"0x2495afB3d3D105C04b51Dc1C11ACd27F0751B2Bf",
]
}
}