Use deleteAccount from useAbstraxnWallet() to permanently delete a connected embedded wallet account (email OTP, passkey, or social login). This removes the wallet organization and backend account rows. It cannot be undone.

Prerequisites

  • AbstraxnProvider is configured and the user is connected.
  • Wallet-service exposes POST /account/delete/prepare and POST /account/delete/submit-stamped.
  • Use only for embedded auth — not for external wallets (MetaMask, WalletConnect, etc.).

React integration

Core SDK (framework-agnostic)

What happens

  1. Client calls prepare → receives a delete-organization activity body.
  2. Client stamps the activity with the session key.
  3. Client submits the stamped activity; the API co-signs and completes deletion.
  4. Backend removes linked auth rows, org wallets, and the user record.
  5. Your app should call disconnect() and clear local session state.

Notes

  • Always show a confirmation UI before calling deleteAccount.
  • Gate the control with useConnectionType() so external wallet users never see it.
  • After success, the previous access token is no longer valid for that account.