# Documents

Handles all Security Token Document related functionality

## Hierarchy

* Namespace‹[SecurityToken](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/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/docs-v2/classes/context)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:12*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Namespace.ts#L12)

### `Protected` parent

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

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:10*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Namespace.ts#L10)

## Methods

### get

▸ **get**(`paginationOpts?`: [PaginationOptions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/paginationoptions)): *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/resultset)*‹*[*TokenDocument*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/tokendocument)*››*

*Defined in* [*src/api/entities/SecurityToken/Documents.ts:38*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/SecurityToken/Documents.ts#L38)

Retrieve all documents linked to the Security Token

**`note`** supports pagination

**Parameters:**

| Name              | Type                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `paginationOpts?` | [PaginationOptions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/paginationoptions) |

**Returns:** *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/resultset)*‹*[*TokenDocument*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/tokendocument)*››*

### set

▸ **set**(`args`: [SetTokenDocumentsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/settokendocumentsparams)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/classes/transactionqueue)*‹*[*SecurityToken*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/classes/securitytoken)*››*

*Defined in* [*src/api/entities/SecurityToken/Documents.ts:25*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/SecurityToken/Documents.ts#L25)

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

**Parameters:**

| Name   | Type                                                                                                                                 |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| `args` | [SetTokenDocumentsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/settokendocumentsparams) |

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