# createAleoWorker

## Description

The `createAleoWorker` method creates a new Web Worker instance for handling Aleo computations. This is useful for offloading heavy cryptographic operations to a separate thread to avoid blocking the main thread.

### Parameters

* **`options` (CreateAleoWorkerOptions)**: An object containing:
  * **`url` (string)**: URL of the worker script file
  * **`baseUrl` (string, optional)**: Base URL to resolve the worker script URL against

### Returns

Returns a wrapped Worker instance configured for Aleo operations using Comlink.

### Example

```javascript
import { createAleoWorker } from "zpass-sdk";

const AleoWorker = () => {
    return createAleoWorker({url: "worker.js", baseUrl: import.meta.url});
};

export { AleoWorker };
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zpass.docs.aleo.org/zpass-sdk/overview/createaleoworker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
