Skip to main content
You are viewing docs for the previous version of the Wallets SDK. We recommend upgrading to V1. See the updated version of this page or the V1 migration guide.
Use an SMS OTP signer as a recovery signer to let users regain access to their wallets when their operational signer is no longer available — for example, when they switch to a new device. The user verifies ownership of their phone number via a one-time password delivered by SMS or optionally WhatsApp, which authorizes the enrollment of a new operational signer.
SMS OTP is a recovery signer, not an operational signer. It is not intended for authorizing day-to-day transactions. The code examples below show how to configure it as the initial signer at wallet creation time, which sets up phone-based recovery for the wallet.
For a conceptual overview, see SMS OTP in the Wallet Signers guide. To learn how to register operational signers on a wallet, see Registering a signer.

Configuration

import { useWallet } from '@crossmint/client-sdk-react-ui';

const { getOrCreateWallet } = useWallet();

const wallet = await getOrCreateWallet({
    chain: "base",
    signer: {
        type: "phone",
        phone: "+1234567890"
    },
});