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.
Import
Usage
Return Value Structure
The hook returns aUseAccountReturn
object with the following properties:
Top-Level 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 connected
Embedded Account Properties
embedded
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 user
External Wallet Properties
external
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
- Additional Cosmos-specific properties
solana
- Solana wallet adapter data (if connected)isConnected: boolean
isConnecting?: boolean
publicKey?: PublicKey
name?: string
icon?: string
Examples
Basic Connection Check
Accessing Embedded Wallet Address
Working with External Wallets
Complete Connect Wallet Component
Notes
- The hook automatically refetches when the user’s authentication state changes
- Use
isLoading
to show loading states while fetching account data - The
embedded
account refers to Para’s native wallet system - External wallets are third-party wallets connected via standard wallet connectors
- When both embedded and external wallets are connected,
connectionType
will be'both'