{"version":3,"file":"ExecutionService-method-action-types.mjs","sourceRoot":"","sources":["../../src/services/ExecutionService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { ExecutionService } from './ExecutionService';\n\n/**\n * Terminates the Snap with the specified ID and deletes all its associated\n * data. Any subsequent messages targeting the Snap will fail with an error.\n * Throws an error if termination fails unexpectedly.\n *\n * @param snapId - The id of the Snap to be terminated.\n */\nexport type ExecutionServiceTerminateSnapAction = {\n  type: `ExecutionService:terminateSnap`;\n  handler: ExecutionService['terminateSnap'];\n};\n\nexport type ExecutionServiceTerminateAllSnapsAction = {\n  type: `ExecutionService:terminateAllSnaps`;\n  handler: ExecutionService['terminateAllSnaps'];\n};\n\n/**\n * Initializes and executes a Snap, setting up the communication channels to the Snap etc.\n *\n * @param snapData - Data needed for Snap execution.\n * @param snapData.snapId - The ID of the Snap to execute.\n * @param snapData.sourceCode - The source code of the Snap to execute.\n * @param snapData.endowments - The endowments available to the executing Snap.\n * @returns A string `OK` if execution succeeded.\n * @throws If the execution service returns an error or execution times out.\n */\nexport type ExecutionServiceExecuteSnapAction = {\n  type: `ExecutionService:executeSnap`;\n  handler: ExecutionService['executeSnap'];\n};\n\n/**\n * Handle RPC request.\n *\n * @param snapId - The ID of the recipient Snap.\n * @param options - Bag of options to pass to the RPC handler.\n * @returns Promise that can handle the request.\n */\nexport type ExecutionServiceHandleRpcRequestAction = {\n  type: `ExecutionService:handleRpcRequest`;\n  handler: ExecutionService['handleRpcRequest'];\n};\n\n/**\n * Union of all ExecutionService action types.\n */\nexport type ExecutionServiceMethodActions =\n  | ExecutionServiceTerminateSnapAction\n  | ExecutionServiceTerminateAllSnapsAction\n  | ExecutionServiceExecuteSnapAction\n  | ExecutionServiceHandleRpcRequestAction;\n"]}