In our dapp, we would like to offer the user to choose from a list of different mainnet nodes, so that latency is low.
Ideally, from the list of BPs the user has voted for.
How to retrieve a list of mainnet nodes (in the web app)?
EOS.IO Stack Exchange is a question and answer site for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO. It only takes a minute to sign up.Sign up to join this community
I know you want a web API for this but the simple thing to do would be to get cleos installed and call it from an AJAX endpoint to run:
cleos -u http://api.eosnewyork.io system listproducers
This returns the list of BPs with URLs and then you can just call any of these BP websites with /bp.json to retrieve the API endpoints for that BP.
PS: The cleos call itself require a BP (I used EOSNewYork as an example).