inAppWallet

Creates an in-app wallet.

Example

import { inAppWallet } from "thirdweb/wallets";
const wallet = inAppWallet();
const account = await wallet.connect({
client,
chain,
strategy: "google",
});

Enable smart accounts and sponsor gas for your users:

import { inAppWallet } from "thirdweb/wallets";
const wallet = inAppWallet({
smartAccount: {
chain: sepolia,
sponsorGas: true,
},
});

Specify a logo for your login page

import { inAppWallet } from "thirdweb/wallets";
const wallet = inAppWallet({
metadata: {
image: {
src: "https://example.com/logo.png",
alt: "My logo",
width: 100,
height: 100,
},
},
});

Hide the ability to export the private key within the Connect Modal

import { inAppWallet } from "thirdweb/wallets";
const wallet = inAppWallet({
hidePrivateKeyExport: true,
});

Open the Oauth window in the same tab

import { inAppWallet } from "thirdweb/wallets";
const wallet = inAppWallet({
auth: {
mode: "redirect",
},
});

Parameters

Returns

The created in-app wallet.