# Documents

Handles all Security Token Document related functionality

## Hierarchy

* Namespace‹[SecurityToken](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/securitytoken)›

  ↳ **Documents**

## Index

### Properties

* [context](#protected-context)
* [parent](#protected-parent)

### Methods

* [get](#get)
* [set](#set)

## Properties

### `Protected` context

• **context**: [*Context*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/context)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:11*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/Namespace.ts#L11)

***

### `Protected` parent

• **parent**: [*SecurityToken*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/securitytoken)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:9*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/Namespace.ts#L9)

## Methods

### get

▸ **get**(`paginationOpts?`: [PaginationOptions](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/paginationoptions.md)): *Promise‹*[*ResultSet*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/resultset.md)*‹*[*TokenDocument*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/tokendocument.md)*››*

*Defined in* [*src/api/entities/SecurityToken/Documents.ts:49*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/SecurityToken/Documents.ts#L49)

Retrieve all documents linked to the Security Token

**`note`** supports pagination

**Parameters:**

| Name              | Type                                                                                                                    |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `paginationOpts?` | [PaginationOptions](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/paginationoptions.md) |

**Returns:** *Promise‹*[*ResultSet*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/resultset.md)*‹*[*TokenDocument*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/tokendocument.md)*››*

***

### set

▸ **set**(`args`: [SetTokenDocumentsParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/settokendocumentsparams.md), `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/transactionqueue)*‹*[*SecurityToken*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/securitytoken)*››*

*Defined in* [*src/api/entities/SecurityToken/Documents.ts:40*](https://github.com/PolymathNetwork/polymesh-sdk/blob/da0f7fd7/src/api/entities/SecurityToken/Documents.ts#L40)

Assign a new list of documents to the Security Token by replacing the existing list of documents with the one passed in the parameters

This requires two transactions

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/proceduremethod.md), which means you can call `set.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [SetTokenDocumentsParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/settokendocumentsparams.md) |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v11/docs/interfaces/procedureopts.md)                     |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/transactionqueue)*‹*[*SecurityToken*](https://developers.polymath.network/polymesh-sdk-api-reference/v11.0.2/classes/securitytoken)*››*
