/** * ExecuteJs API Implementation for naga-dev * * This module provides the executeJs functionality following the same pattern as pkpSign * but adapted for Lit Action execution with signature combination and response processing. * * Features: * - Handles response aggregation and signature combination * - Processes claims, logs, and response data * - Includes response strategy processing (mostCommon, leastCommon, custom) * - Follows the established naga-dev module pattern * * Usage: * This is used internally by the naga-dev module to handle executeJs responses. */ import { ExecuteJsResponse, LitActionResponseStrategy } from '@lit-protocol/types'; import { z } from 'zod'; import { ExecuteJsValueResponse } from '../types'; import { ExecuteJsResponseDataSchema } from './executeJs.ResponseDataSchema'; type ProcessedBatchResult = { success: true; values: T[]; } | { success: false; error: any; failedNodeUrls?: string[]; }; /** * Process Lit Action response strategy * @param responses Array of ExecuteJs responses from nodes * @param strategy Response strategy configuration * @returns Processed response based on strategy */ export declare const processLitActionResponseStrategy: (responses: ExecuteJsValueResponse[], strategy: LitActionResponseStrategy) => string | Record; /** * Handles the response from executeJs operation * * @param result - The batch result from executing the requests * @param requestId - Request ID for logging * @param threshold - Minimum number of successful responses required * @param responseStrategy - Optional response strategy for processing responses * @returns Promise resolving to the executeJs response */ export declare const handleResponse: (result: ProcessedBatchResult>, requestId: string, threshold: number, responseStrategy?: LitActionResponseStrategy) => Promise; export {};