The useViemAccount hook provides a Viem account for a Para wallet.

Import

import { useViemAccount } from "@getpara/react-sdk";

Usage

function ViemAccount() {
  const { viemAccount, isLoading } = useViemAccount();

  if (isLoading) return <div>Loading viem account...</div>;

  return (
    <div>
      <p>Address: {viemAccount.address}</p>
    </div>
  );
}

Return Type

The hook returns a UseViemAccountReturn object with the following properties: