useAccount
Hook to get the current account / address.
Usage
import { useAccount } from "@hypergate/react";
export function App() {
const const account: {
address: `r${string}` | undefined;
addresses: readonly [`r${string}`, ...`r${string}`[]] | undefined;
chainId: number | undefined;
chain: Chain | undefined;
connector: {
readonly icon?: string | undefined;
... 17 more ...;
switchChain: (parameters: {
chainId: number;
}) => Promise<{
id: number;
}>;
} | undefined;
... 4 more ...;
isReconnecting: boolean;
}account = useAccount();
}