Wallet Client
Last updated
Last updated
A Wallet Client is an interface provided by to interact with and provides the ability to retrieve accounts, execute transactions, sign messages, etc through .
You can read more about Wallet Client .
In the comp-kit
library, you're provided with the useWalletClient
hook that you can use in any file of your dapp.
In order to use walletClient
, import useWalletClient
from "@nazeeh2000/comp-kit"
. The return value of this hook will be walletClient
that you can use in any part of your dapp.
You can use walletClient
in your component as per the below example.
You can apply all the methods to the walletClient
that are applicable to the walletClient
of viem
mentioned .
Note: You need to add
use client
at the top of the component accessing these hooks as these hooks cant be run on server side because they've React Context in the background.