> ## 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.

# Export Private Key

> Allow your users to export the private key for their wallets.

The `useExportPrivateKey` hook returns a URL where the user can reauthenticate and view their private key. On React Native, you open this URL in the system browser or an in-app browser.

## Integration

```tsx theme={null}
import { useExportPrivateKey, useWallet } from "@getpara/react-native-wallet";
import { Button, Alert, Linking } from "react-native";

export function ExportKeyButton() {
  const { data: wallet } = useWallet();
  const { exportPrivateKeyAsync, isPending } = useExportPrivateKey();

  const handleExport = async () => {
    try {
      const { url } = await exportPrivateKeyAsync({
        walletId: wallet?.id,
      });

      if (url) {
        const canOpen = await Linking.canOpenURL(url);
        if (canOpen) {
          await Linking.openURL(url);
        } else {
          Alert.alert("Error", "Unable to open export URL");
        }
      }
    } catch (err) {
      console.error("Failed to export private key:", err);
      Alert.alert("Error", "Failed to initiate private key export");
    }
  };

  return (
    <Button
      title={isPending ? "Loading..." : "Export Private Key"}
      onPress={handleExport}
      disabled={isPending || !wallet}
    />
  );
}
```

<Tip>
  For a better user experience, consider using `expo-web-browser` or `react-native-inappbrowser-reborn` to open the export URL within your app instead of leaving it.
</Tip>

## Limitations

Currently, private key export is available for embedded EVM, Cosmos, and Solana wallets. Unclaimed pregenerated wallets and guest mode wallets cannot be exported.

<Note>
  After a pregenerated wallet is claimed, it is no longer app-managed and can use the same export flow as other embedded wallets.
</Note>

<Tip>
  EVM and Cosmos wallets share a key scheme, so an exported key from either works on both chains. Solana wallets use a different scheme (ED25519), so an exported Solana key only works with Solana wallets — you can re-import it at [connect.getpara.com/import](https://connect.getpara.com/import), or self-host the tool from its open-source repo at [getpara/solana-import](https://github.com/getpara/solana-import).
</Tip>
