Connecting Wallets

The SDK supports 500+ wallets out of the box, all you need to pass is their id.

These wallets include thirdweb's first-party wallets like Smart Wallet and In-App Wallet, as well as other popular wallet extensions/mobile apps.

Refer to createWallet and injectedProvider for more information.

import { createThirdwebClient } from "thirdweb";
import { createWallet, injectedProvider } from "thirdweb/wallets";
const client = createThirdwebClient({ clientId });
const metamask = createWallet("io.metamask"); // pass the wallet id
// if user has metamask installed, connect to it
if (injectedProvider("io.metamask")) {
await metamask.connect({ client });
}
// open wallet connect modal so user can scan the QR code and connect
else {
await metamask.connect({
client,
walletConnect: { showQrModal: true },
});
}