There are multiple hooks provided in CosmosKit. They all require ChainProvider from either
@cosmos-kit/react-lite to provide necessary information.
useChain: Provide chainWallet related properties and methods, and support multiple chains connected at one time. When
useChainis called, corresponding chainWallets will be activated.
useChainWallet: Provide chainWallet related properties and methods, and support multiple chains and wallets connected at one time. When
useChainWalletis called, corresponding chainWallet will be activated.
See more information about Differences Between
useManager: Manage all chains and wallets.
useModalTheme: Manage default modal themes.
useNameService: Get alias name of address from a particular name server.
useWallet: Manage all chainWallets and the global status for a particular wallet.
useWalletClient: Get the wallet client for a particular wallet.
useIframe: Set up an iframe that can access the currently connected wallet automatically.
useChainWalletrequires an extra parameter
useChainwill pop up a wallet modal to connect while
- the return value of methods
getNameServicecan be different between
chainWalletsrelated to the parameter