import { FC, ReactNode } from 'react'; import { ChainId, JustaName, JustaNameConfig, JustaNameConfigDefaults, NetworkWithProvider } from '@justaname.id/sdk'; import { defaultRoutes } from '../constants/default-routes'; export type JustaNameConfigWithoutDefaultChainId = Omit; export interface JustaNameContextProps extends Omit { justanameConfig: JustaNameProviderConfig; justaname: JustaName; routes: typeof defaultRoutes; backendUrl: string; selectedNetwork: NetworkWithProvider; selectedEnsDomain: string | undefined; chainId: ChainId | undefined; } export declare const JustaNameContext: import("react").Context; export interface JustaNameProviderProps { children: ReactNode; config: JustaNameProviderConfig; } export interface JustaNameProviderConfig extends JustaNameConfigWithoutDefaultChainId { routes?: Partial; backendUrl?: string; signOnMounted?: boolean; } /** * Provides JustaName context to child components, allowing them to access and interact * with the JustaName service. * * @component * @param {JustaNameProviderProps} props - The props for the JustaNameProvider component. * @returns {ReactNode} The provider component wrapping children. */ export declare const JustaNameProvider: FC; export default JustaNameProvider; /** * Custom hook for accessing the JustaNameContext. * * @hook * @returns {JustaNameContextProps} The context value with JustaName service instance and configuration. * @throws {Error} If the hook is used outside a JustaNameProvider. */ export declare const useJustaName: () => JustaNameContextProps; export declare const buildSignature: (address: string, chainId: ChainId | undefined) => (string | ChainId | undefined)[]; export interface UseSubnameSignatureResult { getSignature: () => Promise<{ signature: string; message: string; address: string; expirationTime: Date; }>; isSubnameSignaturePending: boolean; isSubnameSignatureFetching: boolean; } export declare const useSubnameSignature: () => UseSubnameSignatureResult; //# sourceMappingURL=JustaNameProvider.d.ts.map