How to Add Keplr Wallet to CosmosKit
There are three packages for keplr
@cosmos-kit/keplr
@cosmos-kit/keplr-extension
@cosmos-kit/keplr-mobile
@cosmos-kit/keplr
export all available keplr wallets, while if you only want to add a particular one, choose @cosmos-kit/keplr-extension
or @cosmos-kit/keplr-mobile
Note: all these packages export
wallets
and it's an array ofMainWalletBase
Take @cosmos-kit/keplr
for example
install @cosmos-kit/keplr
yarn add @cosmos-kit/keplr
import the wallets
import { wallets as keplr } from "@cosmos-kit/keplr";
add to your provider
function MyCosmosApp({ Component, pageProps }: AppProps) {
return (
<ChainProvider
chains={chains}
assetLists={assets}
wallets={[...keplr]}
walletConnectOptions={...} // required if `wallets` contains mobile wallets
>
<Component {...pageProps} />
</ChainProvider>
);
}
export default MyCosmosApp;