You’re viewing the 2.0 (LTS) docs. View the current 3.0 version of this page.
useCreateWalletPerType hook creates wallets for multiple chain types in a single call, returning each wallet along with its ID.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook for creating wallets for multiple chain types at once
useCreateWalletPerType hook creates wallets for multiple chain types in a single call, returning each wallet along with its ID.
import { useCreateWalletPerType } from "@getpara/react-native-wallet";
import { useCreateWalletPerType } from "@getpara/react-native-wallet";
import { Button } from "react-native";
function CreateWalletsButton() {
const { createWalletPerTypeAsync, isPending } = useCreateWalletPerType();
const handleCreate = async () => {
try {
const result = await createWalletPerTypeAsync({ types: ["EVM", "COSMOS"] });
console.log("Created wallets:", result.wallets.map((w) => w.id));
} catch (err) {
console.error(err);
}
};
return <Button title={isPending ? "Creating..." : "Create Wallets"} onPress={handleCreate} disabled={isPending} />;
}