disconnect
Disconnects the currently connected wallet.
Clears the in-memory connection state (credential ID and contract ID) and removes the stored session. The stored credentials remain in storage and can be reconnected later. Emits a SmartAccountEvent.WalletDisconnected event if a wallet was connected at the time of the call.
This method is safe to call even if no wallet is connected.
Example:
kit.disconnect()
println("Disconnected. isConnected: ${kit.isConnected}") // falseContent copied to clipboard