> For the complete documentation index, see [llms.txt](https://sdk.chorus.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sdk.chorus.one/api-reference/types/signer_src.signer.md).

# Signer

Defines the interface for a signer that can sign data, retrieve its public key.

### Table of contents

#### Properties

* [init](#init)
* [sign](#sign)
* [getPublicKey](#getpublickey)

### Properties

#### init

• **init**: () => `Promise`<`void`>

Initializes the signer, performing any necessary setup or configuration.

**Type declaration**

▸ (): `Promise`<`void`>

**Returns**

`Promise`<`void`>

***

#### sign

• **sign**: (`signerAddress`: `string`, `signerData`: [`SignerData`](/api-reference/types/signer_src.signerdata.md), `options`: { `note?`: `string` }) => `Promise`<{ `sig`: [`Signature`](/api-reference/types/signer_src.signature.md) ; `pk`: `Uint8Array` }>

Signs the provided data using the private key associated with the signer's address.

**Type declaration**

▸ (`signerAddress`, `signerData`, `options`): `Promise`<{ `sig`: [`Signature`](/api-reference/types/signer_src.signature.md) ; `pk`: `Uint8Array` }>

**Parameters**

| Name            | Type                                                          | Description                                                      |
| --------------- | ------------------------------------------------------------- | ---------------------------------------------------------------- |
| `signerAddress` | `string`                                                      | The address of the signer                                        |
| `signerData`    | [`SignerData`](/api-reference/types/signer_src.signerdata.md) | The data to be signed, which can be a raw message or custom data |
| `options`       | `Object`                                                      | Additional options                                               |
| `options.note?` | `string`                                                      | An optional note to include with the transaction                 |

**Returns**

`Promise`<{ `sig`: [`Signature`](/api-reference/types/signer_src.signature.md) ; `pk`: `Uint8Array` }>

***

#### getPublicKey

• **getPublicKey**: (`address`: `string`) => `Promise`<`Uint8Array`>

Retrieves the public key associated with the signer's address.

**Type declaration**

▸ (`address`): `Promise`<`Uint8Array`>

**Parameters**

| Name      | Type     | Description               |
| --------- | -------- | ------------------------- |
| `address` | `string` | The address of the signer |

**Returns**

`Promise`<`Uint8Array`>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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 following URL with the `ask` and `goal` query parameters:

```
GET https://sdk.chorus.one/api-reference/types/signer_src.signer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
