useAppKit
TheuseAppKit
hook provides functions to control the modal’s visibility. You can use it to programmatically open or close the modal.
- Wagmi
- Ethers
- Ethers v5
open
function
Variable | Description |
---|---|
Connect | Principal view of the modal - default view when disconnected. |
Account | User profile - default view when connected. |
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. |
Swap | Swap tokens seamlessly - users can trade tokens directly in your app with transparent pricing. |
OnRamp | Buy crypto with fiat - users can purchase crypto directly in your app using their preferred payment method. |
useAppKitState
Get the current value of the modal’s state- Wagmi
- Ethers
- Ethers v5
State | Description | Type |
---|---|---|
open | Open state will be true when the modal is open and false when closed. | boolean |
selectedNetworkId | The current chain id selected by the user. | number |
useAppKitEvents
Get the last tracked modal event. The hook accepts an optional callback function that is executed when the event is triggered.- Wagmi
- Ethers
- Ethers v5
useAppKitEventSubscription
Subscribe to modal specific events- Wagmi
- Ethers
- Ethers v5
useWalletInfo
Get the metadata information from the connected wallet- Wagmi
- Ethers
- Ethers v5
Ethereum Library
- Wagmi
- Ethers
- Ethers v5