> For the complete documentation index, see [llms.txt](https://docs.tbaexplorer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tbaexplorer.com/contracts/components/signatory.md).

# Signatory

The Signatory Component primarily controls signer/signature validation. It gives developers the flexibility to define who they want to be a valid signer.

The full contract code of the `SignatoryComponent` can be found [**here**](https://github.com/horuslabsio/TBA/blob/v3/src/components/signatory/signatory.cairo)**.**

## Functions

### `_base_signer_validation`

```rust
fn _base_signer_validation(
  self: @ComponentState<TContractState>, 
  signer: ContractAddress
) -> bool;
```

This function implements a simple signer validation where only the NFT owner is a valid signer.

#### Parameters

| Name     | Type              | Description                                                                   |
| -------- | ----------------- | ----------------------------------------------------------------------------- |
| `signer` | `ContractAddress` | This is the address that is attempting to sign or perform actions on the TBA. |

#### Returns

`bool:` Returns`true` if the `signer` is same as the owner and `false` otherwise.

### `_permissioned_signer_validation`

This function implements a more complex signer validation where NFT owner, root owner, and permissioned addresses are valid signers.

```rust
fn _permissioned_signer_validation(
    self: @ComponentState<TContractState>, signer: ContractAddress
) -> bool;
```

#### Parameters

| Name     | Type              | Description                                                                   |
| -------- | ----------------- | ----------------------------------------------------------------------------- |
| `signer` | `ContractAddress` | This is the address that is attempting to sign or perform actions on the TBA. |

#### Returns

`bool:` Returns `true` if the `signer` is either the owner, the root owner, or a permissioned address, returns `false` otherwise.

### `_is_valid_signature`

This function checks whether a given digital signature is valid.

<pre class="language-rust"><code class="lang-rust"><strong>fn _is_valid_signature(
</strong>   self: @ComponentState&#x3C;TContractState>, hash: felt252, signature: Span&#x3C;felt252>
) -> felt252;
</code></pre>

#### Returns

`felt252:`  It returns `VALIDATED` If the signature is valid.


---

# 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 current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tbaexplorer.com/contracts/components/signatory.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
