# 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>
