# signMessage()

**Method Signature:**

```php
private function signMessage($message, $privateKey)
```

**Parameters**

| Name         | Type   | Description                                                         |
| ------------ | ------ | ------------------------------------------------------------------- |
| `message`    | string | Message that you want to sign. In transactions it must be the TxID. |
| `privateKey` | string | Private key in hexadecimal format.                                  |

**Example**

```php
<?php
require 'vendor/autoload.php';
use CircularProtocol\Api\CircularProtocolAPI;

$circular = new CircularProtocolAPI();
$message = "Hello, World!";
$address = "0x8b1dd25076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd945083738";

$result = $circular->signMessage($message, $address);
```

**Result**

The result will be of type `String`

```json
af14525076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd9450837ab
```


---

# 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://circular-protocol.gitbook.io/standard-apis/api-docs/php/signmessage.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.
