Hooks are React functions that provide access to wallet connection features, modal controls, blockchain interactions, and wallet event subscriptions. They enable you to manage wallet connections, handle user authentication, interact with smart contracts, and respond to wallet events in your application.
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,useAppKitProvider,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) - Payment Hooks: Handle crypto payments and exchange integrations (
usePay,useAvailableExchanges,usePayUrlActions,useExchangeBuyStatus) - Multi-Wallet Hooks: Manage multiple wallet connections (
useAppKitConnections,useAppKitConnection) - Authentication Hooks: Handle authentication and user management (
useAppKitUpdateEmail,useAppKitSIWX) - Solana-Specific Hooks: Solana blockchain interactions (
useAppKitConnectionfrom Solana adapter)
The diagram below illustrates how these hooks relate to each other and to the core AppKit functionality:
These hooks provide a modular way to integrate wallet functionality into your application, allowing you to use only the features you need.
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 the open function
Available namespaces for the Connect view:
| Namespace | Description |
|---|---|
| solana | For connecting to Solana wallets |
| bip122 | For connecting to Bitcoin wallets |
| eip155 | For connecting to Ethereum wallets |
List of views you can select:
| 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 |
| ProfileWallets | View for managing connected wallets in the user profile |
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
Hook for accessing account data and connection status for each namespace when working in a multi-chain environment.
Returns#
allAccounts: A list of connected accounts. Each account includes theaddress,type, andnamespace. Accounts also includecaipAddress(CAIP-10 format) andchainIdwhen network information is available.address: 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:
This is particularly useful when you need to access Bitcoin public keys for transaction signing or address derivation.
useAppKitWallet#

The direct wallet connection hook that enables connectivity to specific wallets without opening the modal. Use this hook when you want to provide direct wallet buttons, create a customized wallet selection interface, or implement social login options.
Using the wallet button hooks (Demo in our Lab), you can directly connect to more than 40 of the top wallets globally, WalletConnect QR, and all the social logins. This hook allows to customize dApps, enabling users to connect their wallets effortlessly, all without the need to open the traditional modal. Execute this command to install the library for use it:
Then you have to import the hook in your project:
And finally, you can use the hook in your project:
Options for the connect parameter#
AppKit supports more than 40 of the top wallets globally (see full list), 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, tokenpocket, haha, ambire-wallet, bitpay, blade-wallet, brave, coinstats, kresus-superapp, plena-app, status, tomo-wallet, valora, and zengo-wallet |
| Social logins | google, github, apple, facebook, x, discord and farcaster |
Enhanced Multichain Examples#
The useAppKitWallet hook now supports enhanced multichain functionality with the namespace prop:
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#
Integration with React Components#
The useAppKitWallet hook works seamlessly with the new React components:
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 acaipNetworkobject as argument.
See how to import or create a 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')multiWallet: Boolean that indicates if multi-wallet functionality is enabled (requires Pro or Enterprise plan)
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#
Subscribes to modal, wallet, and transaction events emitted by AppKit. Useful for analytics, telemetry, custom notifications, or reacting to specific user actions.
The hook returns the latest event object. Each time a new event is emitted, the component re-renders with the new value:
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
See every available event, its trigger condition, and the properties payload.
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#
The wallet information hook that provides details about the connected wallet. Use this hook when you need to display wallet-specific information, show wallet branding, or implement wallet-specific features.
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 the walletProvider and the WalletProviderType for interacting with the connected wallet across different blockchain adapters.
Use Cases#
- Accessing the wallet provider for direct blockchain interactions
- Signing transactions and messages with the connected wallet
- Integrating with blockchain-specific libraries (ethers, solana web3, etc.)
- Building custom wallet interactions across different chains
Adapter Examples#
Related hooks: useAppKitAccount, useAppKitNetwork
useAppKitConnections#
Hook that manages multiple wallet connections and provides access to all connected wallets. This hook enables multi-wallet functionality, allowing users to connect and manage multiple wallets simultaneously within your application.
Multi-wallet functionality must be enabled in your AppKit configuration. This feature requires a Pro or Enterprise plan and must be activated in your Reown Cloud dashboard.
Use Cases#
- Managing multiple wallet connections simultaneously
- Building multi-wallet dashboards or portfolio views
- Implementing wallet comparison features
- Creating advanced wallet management interfaces
- Displaying wallet connection history
Parameters#
namespace(optional): The blockchain namespace to filter connections. Supported values:'eip155'- Ethereum and EVM-compatible chains'solana'- Solana blockchain'bip122'- Bitcoin blockchain- If not specified, uses the currently active namespace
Returns#
-
connections: Array of currently connected wallet connections with the following structure: -
recentConnections: Array of recently disconnected wallet connections (same structure asconnections)
Example: Multi-Chain Wallet Manager#
Related hooks: useAppKitConnection, useAppKitAccount, useAppKitState
useAppKitConnection#
Hook that manages the active wallet connection and provides connection switching capabilities. This hook enables you to work with the currently active connection, switch between multiple connected wallets, and delete wallet connections from the recent list.
Multi-wallet functionality must be enabled in your AppKit configuration. This feature requires a Pro or Enterprise plan and must be activated in your Reown Cloud dashboard.
Use Cases#
- Switching between multiple connected wallets
- Accessing the currently active wallet connection
- Building connection management interfaces
- Implementing wallet-specific features based on the active connection
- Managing wallet connection history
- Handling connection state changes with callbacks
Parameters#
The hook accepts an optional configuration object with the following properties:
-
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 currently active namespace
-
onSuccess(optional): Callback function called when a connection operation succeeds -
onError(optional): Callback function called when a connection operation fails
Returns#
-
connection: The currently active wallet connection (same structure as in useAppKitConnections) -
isPending: Boolean indicating if a connection operation is in progress -
switchConnection: Function to switch to a different connected wallet or account -
deleteConnection: Function to remove a wallet connection from the recent connections list
Example: Complete Connection Manager#
Multi-Account Switching#
When a wallet has multiple accounts, you can switch between them:
Related hooks: useAppKitConnections, useAppKitAccount, useDisconnect
usePay#
Hook that manages payment modal interactions and handles crypto payment flows. Use this hook when implementing payment features with exchange integrations.
Use Cases#
- Implementing crypto payment flows in your application
- Handling payment success and error states
- Integrating with centralized exchanges for payments
- Building custom payment interfaces
Parameters#
onSuccess: Optional callback function called when payment succeedsonError: Optional callback function called when payment fails
Returns#
pay: Function to initiate a payment with specified parametersisLoading: Boolean indicating if a payment is in progresserror: Error object if payment fails
Related hooks: useAvailableExchanges, usePayUrlActions
useAvailableExchanges#
Hook that fetches and manages the state for available exchanges. Use this hook when you need to display available payment options or filter exchanges based on criteria.
Use Cases#
- Displaying available exchanges to users
- Filtering exchanges based on asset or network
- Building custom exchange selection interfaces
- Implementing exchange comparison features
Parameters#
isFetchOnInit: Whether to fetch exchanges on hook initializationasset: Filter exchanges by specific assetamount: Filter exchanges by minimum amountnetwork: Filter exchanges by network support
Returns#
data: Array of available exchangesisLoading: Boolean indicating if exchanges are being fetchederror: Error object if fetching failsfetch: Function to manually refetch exchanges
Related hooks: usePay, usePayUrlActions
usePayUrlActions#
Hook that provides functions to interact with specific exchange URLs, returning the sessionId needed for status tracking. Use this hook when implementing custom exchange flows.
Use Cases#
- Building custom exchange integration flows
- Implementing exchange URL generation
- Creating custom payment interfaces
- Tracking exchange sessions for status monitoring
Returns#
getUrl: Function that returns exchange URL and session IDopenUrl: Function that opens exchange URL and returns session data
Related hooks: useExchangeBuyStatus, useAvailableExchanges
useExchangeBuyStatus#
Hook that fetches and polls for the status of a headless payment transaction using exchangeId and sessionId. Use this hook to track payment progress and handle completion.
Use Cases#
- Tracking payment transaction status
- Implementing payment progress indicators
- Handling payment completion and failure states
- Building real-time payment monitoring
Parameters#
exchangeId: The exchange identifiersessionId: The session ID from payment URL actionspollingInterval: How often to check status (in milliseconds)isEnabled: Whether to enable status pollingonSuccess: Callback for successful payment completiononError: Callback for payment errors
Returns#
data: Current payment status dataisLoading: Boolean indicating if status is being fetchederror: Error object if status fetching failsrefetch: Function to manually refetch status
Related hooks: usePayUrlActions, usePay
useAppKitUpdateEmail#
Hook that updates user email address with success and error handling. Use this hook when implementing email update functionality for user accounts.
Use Cases#
- Implementing email update functionality
- Building user profile management interfaces
- Handling email verification flows
- Creating account settings pages
Parameters#
onSuccess: Optional callback function called when email update succeedsonError: Optional callback function called when email update fails
Returns#
data: Updated email data objecterror: Error object if update failsisPending: Boolean indicating if update is in progressisError: Boolean indicating if there was an errorisSuccess: Boolean indicating if update was successfulupdateEmail: Function to trigger email update
Related hooks: useAppKitAccount, useAppKitWallet
useAppKitSIWX#
Hook that provides access to Sign In With X (SIWX) configuration and state. Use this hook when implementing custom authentication flows with various blockchain protocols.
Use Cases#
- Implementing custom Sign In With X flows
- Accessing SIWX configuration for custom authentication
- Building protocol-specific authentication interfaces
- Handling multi-protocol sign-in scenarios
Returns#
siwxConfig: The current SIWX configuration object, or undefined if not configured
Related hooks: useAppKitAccount, useAppKitUpdateEmail
useAppKitConnection (Solana)#
Solana-specific hook that provides access to the Solana connection instance for blockchain interactions. Use this hook when building Solana-specific features.
Use Cases#
- Accessing Solana connection for blockchain interactions
- Building Solana-specific transaction flows
- Implementing Solana program interactions
- Creating Solana wallet features
Returns#
connection: The Solana connection instance, or undefined if not connected
This is the Solana-specific version of useAppKitConnection. For general connection management, see useAppKitConnection.
Ethereum/Solana Library#
useAppKitAccount#
Hook that returns the client's information.
useSignMessage#
Hook for signing messages with connected account.
switchNetwork#
useAppKitProvider#
Hook that returns the walletProvider and the WalletProviderType.
getError#
switchNetwork#
useAppKitProvider#
Hook that returns the walletProvider and the WalletProviderType.
getError#
useAppKitAccount#
Hook that returns the client's information.
useAppKitProvider#
Hook that returns the walletProvider and the WalletProviderType.
useAppKitConnection#
Hook that returns the connection object. More info about Connection Class