-
Notifications
You must be signed in to change notification settings - Fork 293
RPC cookbook
Ștefan Talpalaru edited this page Dec 4, 2020
·
7 revisions
curl -sd '{"jsonrpc":"2.0","method":"get_v1_node_peers","params":[["connected"]],"id":1}' -H 'Content-Type: application/json' localhost:9190 | jq -r '.result[] | .agent' | cut -d'/' -f1 | sort | uniq -c | sort -n
curl -sd '{"jsonrpc":"2.0","method":"peers","params":[],"id":1}' -H 'Content-Type: application/json' localhost:9190 | jq -r '.result.peers[].info | [.agentVersion,.addrs] | flatten | join(" ")' | grep '^\S\+ \S\+$' | grep -E '/127\.|/10\.|/0\.|/192\.168\.'