Is it possible for a decentralized application to get details about the offered JSON-RPC APIs from the local ethereum node?
I want to check the following specs in the following order using web3.js
:
- Is the RPC port open and listening at
:8545
? - Is the RPC set to allow CORS requests from my domain (
example.com
)? - Which RPC APIs are availabe by the client (
db,eth,net,web3
)?
Is the 2nd step even possible if CORS is disabled for my remote domain? Will a disabled CORS RPC port be discoverable? If so, how?