Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
wallet_disconnect – 1auth
Skip to content

wallet_disconnect

Disconnects the user's wallet from your dApp and clears the stored session. After disconnecting, the user will need to reconnect to interact with your app again. This is a client-side disconnect only - it doesn't revoke any onchain permissions.

Try it

Parameters

None.

Returns

boolean - Returns true on success.

Example

await provider.request({ method: 'wallet_disconnect' });
console.log('Disconnected');

Events

After disconnecting, the provider emits:

  • accountsChanged with an empty array []
  • disconnect
provider.on('accountsChanged', (accounts) => {
  if (accounts.length === 0) {
    console.log('User disconnected');
  }
});
 
provider.on('disconnect', () => {
  console.log('Wallet disconnected');
});

Notes

  • Clears the stored session from localStorage
  • The user will need to reconnect to use the wallet again
  • Does not revoke any onchain permissions