# SignMessage()

**Method Signature:**

```go
func SignMessage(message string, privateKey string) map[string]interface{}
```

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

```go
package main

import (
	"fmt"

	"github.com/circular-protocol/circular-go/circular_protocol_api"
	"github.com/circular-protocol/circular-go/utils"
)

func main() {
	var private_key := "0x40942ed2f05daf2a1b0a36453e5164755dd9ac4c79636f1a243eb21a16e0e4df"
	var message := "Hello, World!"

	result := utils.SignMessage(message, private_key)
	fmt.Println(result)
}

```

**Result**

The result will be of type `Map`, but for easier readability, here is the equivalent in JSON.

```json
{
 "Signature" : "0x...",
 "R" : "value",
 "S" : "value"
}
```


---

# 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/go/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.
