I need to prepare eosio dashboard for that I need multi nodes information.
I am using eosjs
nodejs library to get genesis node chain information. Can I get which other nodes are connected with genesis node and their status information using eosjs
? If yes, then how? Or what are the other ways? Please guide.
1 Answer
I believe it is possible if your nodeos
has the net_api_plugin
enabled, and you connect to the endpoint /v1/net/connections
However I haven't managed to get that to work yet on my local computer. Hopefully that is a starting point for you and if you make it further then you should update here with your answer.
I will also try again, and if I figure it out I'll update this answer
-
after connecting the endpoint
/v1/net/connections
it returns the list of peers with each peer's information.– VarshSep 6, 2022 at 10:31 -