> For the complete documentation index, see [llms.txt](https://circular-protocol.gitbook.io/standard-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://circular-protocol.gitbook.io/standard-apis/api-docs/javascript/signmessage.md).

# signMessage()

**Method Signature:**

```javascript
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**

```javascript
var message = "Hello, World!";
var privatekey = "0x9f1dd25076c04c5139acba458f86cdccd2d322c61d19bc28daa3bbd9450837af";

var signedMessage = CircularProtocolAPI.signMessage(message, privateKey);
```

**Result**

The result will be of type `String`

```
af14525076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd9450837ab
```
