Skip to content

useSignerStatus

The useSignerStatus hook returns an enum of the current status of the AlchemySigner.

Import

ts
import { useSignerStatus } from "@alchemy/aa-alchemy/react";

Usage

tsx
import { useSignerStatus } from "@alchemy/aa-alchemy/react";

export function ComponentWithSignerStatus() {
  const { status } = useSignerStatus();

  return (
    <div>
      <h1>Signer Status: {status}</h1>
    </div>
  );
}

Return Type

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