Before performing other actions, the Application should check whether the user has a Wallet installed. While this is not required, it is good practice to ensure a better user experience.
Before any user actions begin, the user must authorize the connection by calling the connect() method. This will initiate the connection flow in the user's Wallet, particularly if the user has more accounts than what is currently available to the connection.
Since a user can add or remove a connection directly inside the wallet, we also recommend that your application listens for connection state changes using the event listener.
In some cases, an application may want to provide an experience for the user to remove the connection. In these cases, you can use the disconnect() method.