Skip to main content
The useCreateWallet hook creates a new wallet for the authenticated user. Call it after signup completes if automatic wallet creation isn’t configured for your app.

Import

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

Usage

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

function CreateWalletButton() {
  const { createWalletAsync, isPending } = useCreateWallet();

  const handleCreate = async () => {
    try {
      const [wallet] = await createWalletAsync({ type: "EVM" });
      console.log("Created wallet:", wallet.id);
    } catch (err) {
      console.error(err);
    }
  };

  return <Button title={isPending ? "Creating..." : "Create Wallet"} onPress={handleCreate} disabled={isPending} />;
}