Hook for retrieving the current embedded account and connected external wallets
useAccount
hook provides access to the current user’s account state, including both embedded Para accounts and connected external wallets across EVM, Cosmos, and Solana chains.
UseAccountReturn
object with the following properties:
isConnected: boolean
- Whether there is a wallet connected (either embedded, external or both)isLoading: boolean
- Whether the account is currently loadingconnectionType: 'embedded' | 'external' | 'both' | 'none'
- The type of connection for the account
'embedded'
- Only the embedded account is connected'external'
- Only an external wallet is connected'both'
- Both embedded and external wallets are connected'none'
- No wallets are connectedembedded
object contains:
isConnected: boolean
- Whether the embedded Para account is connectedisGuestMode?: boolean
- Whether the user is in guest modeuserId?: string
- Unique identifier for the userauthType?: 'email' | 'phone' | 'farcaster' | 'telegram' | 'externalWallet'
- Authentication method usedemail?: string
- User’s email address (only if authType is ‘email’)phone?: string
- User’s phone number (only if authType is ‘phone’)farcasterUsername?: string
- Farcaster username (only if authType is ‘farcaster’)telegramUserId?: string
- Telegram user ID (only if authType is ‘telegram’)externalWalletAddress?: string
- External wallet address (only if authType is ‘externalWallet’)wallets?: Array<Wallet>
- Array of available wallets for the userexternal
object contains:
connectedNetworks: Array<'evm' | 'cosmos' | 'solana'>
- List of connected external networksevm
- EVM wallet connection data (if connected)
isConnected: boolean
address?: string
addresses?: string[]
chain?: Chain
chainId?: number
status: 'connected' | 'reconnecting' | 'connecting' | 'disconnected'
cosmos
- Cosmos wallet connection data (if connected)
isConnected: boolean
solana
- Solana wallet adapter data (if connected)
isConnected: boolean
isConnecting?: boolean
publicKey?: PublicKey
name?: string
icon?: string
isLoading
to show loading states while fetching account dataembedded
account refers to Para’s native wallet systemconnectionType
will be 'both'