# API Reference

Refer to the Contracts and IP Addresses section to query the right resources

**Worm Contract**

<table><thead><tr><th width="260">Method</th><th>Description</th></tr></thead><tbody><tr><td>getWormState</td><td>Returns the state values of the left and right muscles </td></tr><tr><td>trigger</td><td>Externally trigger chemotaxis and noseTouch on the worm </td></tr><tr><td>lastUpdatedTimestamp</td><td>Returns the number of the block when the worm's start was last updated</td></tr><tr><td>lastTriggeredTimestamp</td><td>Returns the number of the block when the trigger method was last called</td></tr><tr><td>enclave</td><td>Returns the key last registered by an attested enclave hosting the worm brain</td></tr><tr><td>pcrs</td><td>Returns the PCR values that enclaves must have to be considered valid</td></tr></tbody></table>

**TEE Endpoints**

<table><thead><tr><th width="263">Method</th><th>Description</th></tr></thead><tbody><tr><td>/set?address=&#x3C;address></td><td>One-shot endpoint to set the worm's contract address at the start</td></tr><tr><td>/leftmuscle</td><td>Left muscle value</td></tr><tr><td>/rightmuscle</td><td>Right muscle value</td></tr><tr><td>/state?id=&#x3C;N></td><td>State of the Nth neuron</td></tr></tbody></table>


---

# 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://docs.deepworm.xyz/deepworm/resources/api-reference.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.
