Skip to main content
The useCreateGuestWallets hook creates wallets for a guest (unauthenticated) session. Guest wallets can be claimed later when the user signs up.

Import

import { useCreateGuestWallets } from "@getpara/react-native-wallet";

Usage

import { useCreateGuestWallets } from "@getpara/react-native-wallet";
import { Button } from "react-native";

function GuestWalletButton() {
  const { createGuestWalletsAsync, isPending } = useCreateGuestWallets();

  const handleCreate = async () => {
    try {
      const wallets = await createGuestWalletsAsync();
      console.log("Guest wallets:", wallets.map((w) => w.id));
    } catch (err) {
      console.error(err);
    }
  };

  return <Button title={isPending ? "Creating..." : "Continue as Guest"} onPress={handleCreate} disabled={isPending} />;
}