Skip to main content

Use the embedded wallet

Obtain an instance of the connected wallet

In react, you can access the wallet instance using the useWallet hook.

import { useWallet } from "@thirdweb-dev/react"; // or /react-native

const embeddedWallet = useWallet("embeddedWallet");

Get the user email

const email = await embeddedWallet.getEmail();

Get the user wallet address

import { useAddress } from "@thirdweb-dev/react"; // or /react-native

const address = useAddress();

Get the user's signer

import { useSigner } from "@thirdweb-dev/react"; // or /react-native

const signer = useSigner();

Transfer funds

await embeddedWallet.transfer("0x...", 0.1); // amount in ETH

Sign a message

await embeddedWallet.sign("Hello World!");