useWalletAuth
Read wallet connection state and trigger Privy/SIWE login or logout from the flowstack-sdk/wallet entry point.
import { useWalletAuth } from 'flowstack-sdk/wallet'Provides wallet connection state and login/logout controls for the wallet module. Available only on casino.flowstack.fun where Privy can run on the page origin. Built apps authenticate via BrokeredLoginButton instead.
Signature
const { isConnected, isLoading, address, isEmbeddedWallet, authMethod, error, login, logout } = useWalletAuth()Returns
| Field | Type | Description |
|---|---|---|
isConnected | boolean | Whether a wallet is connected. |
isLoading | boolean | Auth request in flight. |
address | string | null | Checksummed wallet address. |
isEmbeddedWallet | boolean | Privy embedded wallet vs MetaMask. |
authMethod | 'privy' | 'siwe' | null | The active authentication method. |
error | string | null | Last auth error message. |
login | (method?: 'privy' | 'wallet') => Promise<void> | Connect via Privy or an external wallet. |
logout | () => void | Disconnect the wallet. |
WarningBuilt apps: do not use this hook for authentication. Use
BrokeredLoginButton from flowstack-sdk instead — Privy can only run on casino.flowstack.fun, not on built-app subdomains.See also
useInferBalance · useAgentBalance · LoginButton · BrokeredLoginButton
Source: README.md#usewalletauth · Also available in llms-full.txt and registry.json.