Cosmos Kit
- useWallet

Hook - useWallet

  • required provider: ChainProvider from either @cosmos-kit/react or @cosmos-kit/react-lite

  • parameters:

    • walletName?: WalletName ( = string );
    • activeOnly: boolean (default to be true);

If walletName is undefined, using currentWallet instead. See LocalStorage key cosmos-kit@2:core//current-wallet. If currentWallet is also undefined, return default values.

If activeOnly is true, only look at chainWallets with isActive true. When useChain is called, corresponding chainWallet will be activated.

Type - WalletContext


mainWalletthe mainWallet`MainWalletBaseundefined`
chainWalletsall the chainWallets (including chains that not be called by useChain)ChainWalletBase[][]
walletwallet registry informationWallet | undefinedundefined
statusglobal wallet status involves all active chainWallets if activeOnly is trueWalletStatusWalletStatus.Disconnected
message-string | undefinedundefined


global wallet status (opens in a new tab)