import { MutableRefObject } from 'react'; import { Callbacks } from '@crossmint/wallets-sdk'; type SignerType = "email" | "phone"; type DialogStep = "initial" | "otp"; interface SignerAuthState { emailSignerDialogOpen: boolean; emailSignerDialogStep: DialogStep; setEmailSignerDialogOpen: (open: boolean) => void; setEmailSignerDialogStep: (step: DialogStep) => void; phoneSignerDialogOpen: boolean; phoneSignerDialogStep: DialogStep; setPhoneSignerDialogOpen: (open: boolean) => void; setPhoneSignerDialogStep: (step: DialogStep) => void; /** The email address from the active auth flow (set by onAuthRequired callback). */ activeAuthEmail: string | undefined; /** The phone number from the active auth flow (set by onAuthRequired callback). */ activeAuthPhone: string | undefined; sendEmailOtpRef: MutableRefObject<() => Promise>; verifyOtpRef: MutableRefObject<(otp: string) => Promise>; sendPhoneOtpRef: MutableRefObject<() => Promise>; verifyPhoneOtpRef: MutableRefObject<(otp: string) => Promise>; rejectRef: MutableRefObject<(error?: Error) => void>; } interface SignerAuthHandlers { emailsigners_handleSendEmailOTP: () => Promise; emailsigners_handleOTPSubmit: (otp: string) => Promise; emailsigners_handleResendOTP: () => Promise; phonesigners_handleSendPhoneOTP: () => Promise; phonesigners_handleOTPSubmit: (otp: string) => Promise; phonesigners_handleResendOTP: () => Promise; onAuthRequired: Callbacks["onAuthRequired"]; } declare function useSignerAuth(): SignerAuthState & SignerAuthHandlers; export { type DialogStep, type SignerAuthHandlers, type SignerAuthState, type SignerType, useSignerAuth };