For the complete documentation index, see llms.txt. This page is also available as Markdown.

disconnect

Disconnects the currently selected wallet, clears all session data, and removes cached address data from local storage.


Usage

import { disconnect } from '@stacks/connect';

disconnect();

Notes

  • If the currently selected provider supports a custom disconnect method (e.g. WalletConnect), it will be called first.

  • The selected provider ID is cleared, so subsequent calls to request will prompt wallet selection again.

  • All data stored via getLocalStorage is removed.

  • The legacy UserSession data is also deleted.

Reference Link


Signature

function disconnect(): void

Returns

void

This function does not return a value.


Parameters

This function takes no parameters.

Last updated

Was this helpful?