Hook Ecosystem
AppKit provides a comprehensive set of React hooks that work together to provide a complete wallet connection and blockchain interaction experience. These hooks can be categorized into several functional groups:- Connection Hooks: Manage wallet connections and user authentication (
useAppKit
,useAppKitAccount
,useDisconnect
) - Network Hooks: Handle blockchain network selection and information (
useAppKitNetwork
) - UI Control Hooks: Control the modal and UI elements (
useAppKitState
,useAppKitTheme
) - Data Access Hooks: Access wallet and blockchain data (
useAppKitBalance
,useWalletInfo
) - Event Hooks: Subscribe to wallet and connection events (
useAppKitEvents
)
useAppKit
The primary hook for controlling the modal’s visibility and behavior. Use this hook when you need to programmatically open or close the modal, or when you want to show specific views like the connection screen or account details.Use Cases
- Opening the modal when a user clicks a “Connect Wallet” button
- Closing the modal after a successful connection
- Opening specific views of the modal (e.g., account view, connect view)
- Handling custom wallet connection flows
Returns
open
: Function to open the modalclose
: Function to close the modal
Parameters
You can also select the modal’s view when calling theopen
function
Namespace | Description |
---|---|
solana | For connecting to Solana wallets |
bip122 | For connecting to Bitcoin wallets |
eip155 | For connecting to Ethereum wallets |
Variable | Description |
---|---|
Connect | Principal view of the modal - default view when disconnected. A namespace can be selected to connect to a specific network (solana, bip122 or eip155) |
Account | User profile - default view when connected |
AllWallets | Shows the list of all available wallets |
Networks | List of available networks - you can select and target a specific network before connecting |
WhatIsANetwork | ”What is a network” onboarding view |
WhatIsAWallet | ”What is a wallet” onboarding view |
OnRampProviders | On-Ramp main view |
WalletSend | Token sending interface that allows users to send tokens to another address |
Swap | Swap main view |
useAppKitAccount
The essential hook for accessing wallet connection state and user information. Use this hook whenever you need to know if a user is connected, get their wallet address, or access their embedded wallet details.Use Cases
- Displaying the connected wallet address in your UI
- Checking if a user is connected before showing certain features
- Getting user information for embedded wallets
- Handling multi-chain scenarios where you need account info for specific chains
Related hooks: useAppKitWallet, useDisconnect
Returns
allAccounts
: A list of connected accountsaddress
: The current account addresscaipAddress
: The current account address in CAIP formatisConnected
: Boolean that indicates if the user is connectedstatus
: The current connection statusembeddedWalletInfo
: The current embedded wallet information
Getting Bitcoin Public Keys
When working with Bitcoin accounts, you can extract public keys from the connected accounts:useAppKitWallet

Options for the connect parameter
AppKit supports the top 32 wallets, WalletConnect, social logins, and email authentication:Type | Options |
---|---|
QR Code | walletConnect |
Wallets | metamask , trust , coinbase , rainbow , jupiter , solflare , coin98 , magic-eden , backpack , frontier , xverse , okx , bitget , leather , binance , uniswap , safepal , bybit , phantom , ledger , timeless-x , safe , zerion , oneinch , crypto-com , imtoken , kraken , ronin , robinhood , exodus , argent , and tokenpocket |
Social logins | google , github , apple , facebook , x , discord , and farcaster |
email |
Use Cases
useAppKitWallet
enables:
-
Direct Wallet Integration
- Direct connection to specific wallets (e.g., MetaMask, Coinbase)
- Streamlined connection flow without modal
-
Social Authentication
- Social login options (Google, GitHub, etc.)
- Email-based authentication
-
Custom Wallet Selection
- Branded wallet selection interface
- Custom styling and filtering options
-
Network-Specific Access
- Chain-specific wallet options
- Conditional wallet availability
-
Enhanced UX
- Loading states and error handling
- Custom notifications
- Responsive connection states
-
Multichain Support
- Connect to specific blockchain namespaces
- Target wallets for specific chains (EVM, Solana, Bitcoin)
Multichain Examples
Parameters
namespace
(optional): The blockchain namespace to target. Supported values:'eip155'
- Ethereum and EVM-compatible chains'solana'
- Solana blockchain'bip122'
- Bitcoin blockchain- If not specified, uses the default namespace from your AppKit configuration
useAppKitNetwork
The network management hook that provides access to chain information and network switching capabilities. Use this hook when you need to display the current network, switch between networks, or validate network compatibility.Use Cases
- Displaying the current network/chain in your UI
- Switching networks when a user selects a different chain
- Validating if a user is on the correct network for your dApp
- Handling network-specific features or contracts
Related hooks: useAppKitBalance, useWalletInfo
Returns
caipNetwork
: The current network objectcaipNetworkId
: The current network id in CAIP formatchainId
: The current chain idswitchNetwork
: Function to switch the network. Accepts acaipNetwork
object as argument.
See how to import or use custom networks
here.
useAppKitBalance
The balance management hook that provides functions to fetch the native token balance of the connected wallet. Use this hook when you need to display the user’s balance, check if they have sufficient funds for a transaction, or track balance changes.Use Cases
- Displaying the user’s wallet balance in your UI
- Checking if a user has sufficient funds before initiating a transaction
- Monitoring balance changes after transactions
- Implementing balance-based features or UIs
Related hooks: useAppKitAccount, useAppKitNetwork
Returns
fetchBalance
: Async function that returns the current balance of the connected wallet
useAppKitState
The state management hook that provides real-time access to the modal’s current state. Use this hook when you need to react to modal state changes or synchronize your UI with the modal’s status.Use Cases
- Syncing your UI with the modal’s open/closed state
- Tracking which network the user has selected
- Creating custom UI elements that respond to modal state changes
- Implementing custom loading states based on modal state
- Checking if AppKit has been fully initialized before rendering components
- Displaying chain-specific UI based on the active blockchain namespace
Returns
initialized
: Boolean that indicates if AppKit has been initialized. This sets to true when all controllers, adapters and internal state is readyloading
: Boolean that indicates if AppKit is loadingopen
: Boolean that indicates if the modal is openselectedNetworkId
: The current chain id selected by the user in CAIP-2 formatactiveChain
: The active chain namespace (e.g., ‘eip155’, ‘solana’, ‘bip122’)
Example Usage
useAppKitTheme
The theming hook that controls the visual appearance of the modal. Use this hook when you need to customize the modal’s colors, implement dark/light mode, or match the modal’s appearance with your application’s theme.Use Cases
- Implementing dark/light mode in your dApp
- Customizing the modal’s appearance to match your brand
- Creating theme-specific UI elements
- Syncing the modal’s theme with your app’s theme
useAppKitEvents
The event subscription hook that allows you to listen to modal and wallet events. Use this hook when you need to track user interactions, implement analytics, or respond to specific wallet events in your application.Use Cases
- Tracking user interactions with the modal
- Implementing analytics for wallet connections
- Creating custom notifications for connection events
- Handling specific wallet events in your application
useDisconnect
The session management hook that handles wallet disconnection. Use this hook when implementing logout functionality or when you need to clean up resources after a user disconnects their wallet.Parameters
namespace
(optional): The specific chain namespace to disconnect from. If not provided, disconnects from all connected namespaces.
Use Cases
- Implementing a “Disconnect Wallet” button
- Handling logout flows in your application
- Cleaning up resources when a user disconnects
- Resetting application state after disconnection
- Disconnecting from specific chains in multi-chain applications
useWalletInfo
Hook for accessing wallet information.Use Cases
- Displaying wallet-specific information in your UI
- Implementing wallet-specific features
- Showing wallet icons or branding
- Handling wallet-specific behaviors
useAppKitProvider
Hook that returns thewalletProvider
and the WalletProviderType
for interacting with the connected wallet across different blockchain adapters.
Use Cases
- Direct wallet interactions (signing messages, sending transactions)
- Access to wallet-specific methods and properties
- Integration with blockchain libraries (Ethers, Wagmi, Solana Web3.js)
Examples
Returns
walletProvider
: The wallet provider instance for the specified chain namespacewalletProviderType
: The type of wallet provider currently connected
Ethereum/Solana Library
useAppKitAccount
Hook that returns the client’s information.useSignMessage
Hook for signing messages with connected account.useAppKitProvider
Hook that returns thewalletProvider
and the WalletProviderType
.