Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getpara.com/llms.txt

Use this file to discover all available pages before exploring further.

The useAccount hook returns the current user’s account information including their connection status, user ID, and linked auth methods.

Import

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

Usage

import { useAccount } from "@getpara/react-native-wallet";
import { View, Text } from "react-native";

function AccountStatus() {
  const { embedded, isConnected, connectionType, isLoading } = useAccount();

  if (isLoading) return <Text>Loading...</Text>;

  return (
    <View>
      <Text>Status: {isConnected ? "Connected" : "Not connected"}</Text>
      <Text>Connection: {connectionType}</Text>
      {embedded?.userId && <Text>User ID: {embedded.userId}</Text>}
      {embedded?.identifier && <Text>Identifier: {embedded.identifier}</Text>}
      {embedded?.wallets?.map((w) => (
        <Text key={w.id}>{w.type}: {w.address}</Text>
      ))}
    </View>
  );
}

Return Value

PropertyTypeDescription
isConnectedbooleanWhether any wallet is connected (embedded or external)
isLoadingbooleanWhether the account is still loading
connectionType'embedded' | 'external' | 'both' | 'none'The type of active connection
embeddedobjectThe embedded Para account data
embedded.userIdstringThe user’s Para ID
embedded.identifierstringThe user’s login identifier (email, phone, etc.)
embedded.authTypestringThe authentication method used
embedded.walletsWallet[]All wallets on the account
embedded.isConnectedbooleanWhether the embedded wallet specifically is connected
embedded.isGuestModebooleanWhether the user is in guest mode
externalobjectExternal wallet data (web only, empty on React Native)