Docs / wallet / useWalletAuth

useWalletAuth

hooknot for built apps

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

FieldTypeDescription
isConnectedbooleanWhether a wallet is connected.
isLoadingbooleanAuth request in flight.
addressstring | nullChecksummed wallet address.
isEmbeddedWalletbooleanPrivy embedded wallet vs MetaMask.
authMethod'privy' | 'siwe' | nullThe active authentication method.
errorstring | nullLast auth error message.
login(method?: 'privy' | 'wallet') => Promise<void>Connect via Privy or an external wallet.
logout() => voidDisconnect 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.