Hook - useWallet
-
required provider: ChainProvider from either
@cosmos-kit/reactor@cosmos-kit/react-lite -
parameters:
- walletName?:
WalletName( =string); - activeOnly:
boolean(default to betrue);
- walletName?:
If
walletNameisundefined, usingcurrentWalletinstead. See LocalStorage keycosmos-kit@2:core//current-wallet. IfcurrentWalletis also undefined, return default values.
If
activeOnlyistrue, only look at chainWallets withisActivetrue. WhenuseChainis called, corresponding chainWallet will be activated.
- return type: WalletContext
Type - WalletContext
Properties
| Name | Description | Type | Default |
|---|---|---|---|
| mainWallet | the mainWallet | `MainWalletBase | undefined` |
| chainWallets | all the chainWallets (including chains that not be called by useChain) | ChainWalletBase[] | [] |
| wallet | wallet registry information | Wallet | undefined | undefined |
| status | global wallet status involves all active chainWallets if activeOnly is true | WalletStatus | WalletStatus.Disconnected |
| message | - | string | undefined | undefined |