Hooks
useAppKit
Control the modal with the useAppKit
hook
You can also select the modal’s view when calling the open
function
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. |
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. |
useAppKitState
Get the current value of the modal’s state
The modal state consists of two reactive values:
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.
useAppKitEventSubscription
Subscribe to modal specific events
useWalletInfo
Get the metadata information from the connected wallet
Ethereum Library
useAppKitAccount
Hook that returns the client’s information.
useSignMessage
Hook for signing messages with connected account.
useReadContract
Hook for calling a read method on a Contract.
Learn More
useAppKitAccount
Hook that returns the client’s information.
useSignMessage
Hook for signing messages with connected account.
useReadContract
Hook for calling a read method on a Contract.
Learn More
useAppKitAccount
Hook that returns the client’s information.
useAppKitProvider
Hook that returns the walletProvider
and the WalletProviderType
.
useAppKitError
Learn More About Ethers
useAppKitAccount
Hook that returns the client’s information.
useAppKitProvider
Hook that returns the walletProvider
and the WalletProviderType
.