useSignerStatus
The useSignerStatus
hook returns an enum of the current status of the AlchemySigner
.
Import
import { useSignerStatus } from "@alchemy/aa-alchemy/react";
Usage
useSignerStatus.tsx
import { useSignerStatus } from "@alchemy/aa-alchemy/react";
export function ComponentWithSignerStatus() {
const { status } = useSignerStatus();
return (
<div>
<h1>Signer Status: {status}</h1>
</div>
);
}
Return Type
import { type UseSignerStatusResult } from "@alchemy/aa-alchemy/react";
status
"INITIALIZING" | "CONNECTED" | "DISCONNECTED" | "AUTHENTICATING" | "AWAITING_EMAIL_AUTH"
The string representation of the current signer status.
isInitializing
boolean
Returns true
if the signer is initializing.
isAuthenticating
boolean
Returns true
if the signer is currently waiting for the user to complete the authentication process.
isConnected
boolean
Returns true
if the signer is authenticated.
isDisconnected
boolean
Returns true
if the signer is disconnected and unauthenticated.