import type { Hex } from 'viem'; import { type GrantPermissionsParameters, type GrantPermissionsReturnType } from 'viem/experimental'; import { OpenfortError } from '../../core/errors'; import type { OpenfortHookOptions } from '../../types'; type GrantPermissionsRequest = { request: GrantPermissionsParameters; sessionKey: Hex; }; type GrantPermissionsResult = { address: `0x${string}`; } & GrantPermissionsReturnType; type GrantPermissionsHookResult = { error?: OpenfortError; } & Partial; type GrantPermissionsHookOptions = OpenfortHookOptions; /** * Grants session key permissions for EIP-7702 / account abstraction. * * @param hookOptions - Optional callbacks and configuration * @returns grantPermissions(request), status, data, error * * @example * ```tsx * const { grantPermissions } = useGrantPermissions() * await grantPermissions({ request: { ... } }) * ``` */ export declare const useGrantPermissions: (hookOptions?: GrantPermissionsHookOptions) => { isLoading: boolean; isError: boolean; isSuccess: boolean; error: OpenfortError | null | undefined; grantPermissions: ({ request }: GrantPermissionsRequest, options?: GrantPermissionsHookOptions) => Promise; data: GrantPermissionsResult | null; reset: () => void; }; export {};