Skip to main content

Connecting Wallets

WalletWallet Configurator (React)Hook (React)Wallet Class (Typescript)
MetaMaskmetamaskWalletuseMetamaskMetaMaskWallet
Coinbase WalletcoinbaseWalletuseCoinbaseWalletCoinbaseWallet
Wallet Connect v2walletConnectuseWalletConnectWalletConnect
Safe WalletsafeWalletuseSafeSafeWallet
Paper WalletpaperWalletusePaperWalletPaperWallet
Local WalletlocalWalletuseConnectLocalWallet
Smart WalletsmartWalletuseSmartWalletSmartWallet
Magic LinkmagicLinkuseMagicMagicLink
Rainbow WalletrainbowWalletuseRainbowWalletWalletConnect
Zerion WalletzerionWalletuseConnectZerionWallet
Blocto WalletbloctoWalletuseBloctoWalletBloctoWallet
Frame WalletframeWalletuseFrameWalletFrameWallet

There are two ways you can enable users to connect their wallet with your application:

  1. Using the ConnectWallet component, for a pre-built approach.
  2. Using the wallet connection hooks, for a customizable approach.

Using the Connect Wallet Button

To allow users to connect wallet using the ConnectWallet component, you must first declare which wallets you want to support in supportedWallets prop of the ThirdwebProvider component,

If no supportedWallets prop is passed, the default is to support metamaskWallet, coinbaseWallet.

import {
ThirdwebProvider,
metamaskWallet,
coinbaseWallet,
walletConnect,
safeWallet,
paperWallet,
magicLink,
} from "@thirdweb-dev/react";

function MyApp() {
return (
<ThirdwebProvider
supportedWallets={[
metamaskWallet(),
coinbaseWallet(),
walletConnect({
projectId: "YOUR_PROJECT_ID",
}),
safeWallet(),
paperWallet({
clientId: "YOUR_CLIENT_ID",
}),
magicLink({
apiKey: "YOUR_MAGIC_API_KEY",
}),
]}
activeChain="mumbai"
clientId="your-client-id"
>
<App />
</ThirdwebProvider>
);
}

Using hooks

Either use a useConnect hook or use the wallet specific hooks as shown in the table above.