isConnected method

bool isConnected()

Returns true if the provider is connected to the current chain, and false otherwise.

Note that this method has nothing to do with the user's accounts.

You may often encounter the word "connected" in reference to whether a web3 site can access the user's accounts. In the provider interface, however, "connected" and "disconnected" refer to whether the provider can make RPC requests to the current chain.

Implementation

external bool isConnected();