import { ReactNode } from 'react'; import { ErrorCode } from '@dynamic-labs/utils'; /** * Error code used when Phantom relays an internal signing failure via its * deep-link redirect (e.g. the active account has no usable key to sign). * Phantom's own code for these is generic (e.g. `500`), so we normalize to * this key to surface an actionable message instead of the default fallback. */ export declare const PHANTOM_SIGNING_FAILED_ERROR_CODE = "phantom_signing_failed"; interface ErrorContextProps { error: string | undefined; errorCode: ErrorCode | string | undefined; setError(error: string | undefined, errorCode?: ErrorCode | string): void; setErrorMessage: (status: string, error?: unknown, source?: string) => void; setDefaultError: (error?: unknown) => void; clearError(): void; } /** * Returns the mapped, user-facing message for a given error code, or * `undefined` when the code is not recognized. Exported so callers can decide * whether to normalize an unmapped code before displaying it. */ export declare const getMappedErrorMessage: (status: string) => string | undefined; export declare const ErrorContext: import("react").Context; export declare const ErrorContextProvider: ({ children }: { children: ReactNode; }) => JSX.Element; export declare const useErrorContext: () => ErrorContextProps; export {};