Wallet Integration
This guide covers connecting wallets and authenticating users with the Privacy Boost React SDK.Basic Authentication
useAuth Return Value
| Property | Type | Description |
|---|---|---|
isConnected | boolean | Whether a wallet is connected |
isAuthenticated | boolean | Whether the user is fully authenticated |
isWalletAvailable | boolean | Whether a wallet provider exists |
address | string | null | Connected wallet address |
privacyAddress | string | null | User’s privacy address |
authenticate | (adapter, options?) => Promise | Authenticate with a wallet adapter |
authenticateWithWalletAdapter | (options?) => Promise | Authenticate with browser wallet |
logout | () => Promise | Full sign-out |
clearSession | () => Promise | Clear auth token, keep keys |
Injected Wallet (MetaMask, etc.)
Custom Wallet Adapter
Complete Example
Error Handling
Best Practices
1. Check Wallet Availability
Always checkisWalletAvailable before showing the connect button.