> For the complete documentation index, see [llms.txt](https://developers.polymath.network/classic-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.polymath.network/classic-sdk/beta/external-modules/_entities_securitytoken_documents_.documents.md).

# Documents

Namespace that handles all document Related functionality

## Hierarchy

* [SubModule](broken://pages/-M-tw-_imoK_Iy9YVBmV)

  ↳ **Documents**

## Index

### Constructors

* [constructor](broken://pages/-M-tw-_b32kT4cnTpTCS#constructor)

### Properties

* [context](broken://pages/-M-tw-_b32kT4cnTpTCS#protected-context)
* [securityToken](broken://pages/-M-tw-_b32kT4cnTpTCS#protected-securitytoken)

### Methods

* [getAllDocuments](broken://pages/-M-tw-_b32kT4cnTpTCS#getalldocuments)
* [getDocument](broken://pages/-M-tw-_b32kT4cnTpTCS#getdocument)
* [remove](broken://pages/-M-tw-_b32kT4cnTpTCS#remove)
* [set](broken://pages/-M-tw-_b32kT4cnTpTCS#set)

## Constructors

### constructor

\+ **new Documents**(`securityToken`: [SecurityToken](broken://pages/-M-tw-_gGGX7EAygI8FP), `context`: [Context](broken://pages/-M-tw-_Q7PZbtE8P8eVD)): [*Documents*](broken://pages/-M-tw-_b32kT4cnTpTCS)

*Inherited from* [*SubModule*](broken://pages/-M-tw-_imoK_Iy9YVBmV)*.*[*constructor*](broken://pages/-M-tw-_imoK_Iy9YVBmV#constructor)

*Defined in* [*src/entities/SecurityToken/SubModule.ts:10*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/SecurityToken/SubModule.ts#L10)

Create a new SubModule instance

**Parameters:**

| Name            | Type                                                 |
| --------------- | ---------------------------------------------------- |
| `securityToken` | [SecurityToken](broken://pages/-M-tw-_gGGX7EAygI8FP) |
| `context`       | [Context](broken://pages/-M-tw-_Q7PZbtE8P8eVD)       |

**Returns:** [*Documents*](broken://pages/-M-tw-_b32kT4cnTpTCS)

## Properties

### `Protected` context

• **context**: [*Context*](broken://pages/-M-tw-_Q7PZbtE8P8eVD)

*Inherited from* [*SubModule*](broken://pages/-M-tw-_imoK_Iy9YVBmV)*.*[*context*](broken://pages/-M-tw-_imoK_Iy9YVBmV#protected-context)

*Defined in* [*src/entities/SecurityToken/SubModule.ts:10*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/SecurityToken/SubModule.ts#L10)

### `Protected` securityToken

• **securityToken**: [*SecurityToken*](broken://pages/-M-tw-_gGGX7EAygI8FP)

*Inherited from* [*SubModule*](broken://pages/-M-tw-_imoK_Iy9YVBmV)*.*[*securityToken*](broken://pages/-M-tw-_imoK_Iy9YVBmV#protected-securitytoken)

*Defined in* [*src/entities/SecurityToken/SubModule.ts:8*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/SecurityToken/SubModule.ts#L8)

## Methods

### getAllDocuments

▸ **getAllDocuments**(): *Promise‹*[*Document*](broken://pages/-M-tw-bZ6xb5OS9fzCnN)*\[]›*

*Defined in* [*src/entities/SecurityToken/Documents.ts:90*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/SecurityToken/Documents.ts#L90)

Retrieve an array of all the documents attached to the security token

**Returns:** *Promise‹*[*Document*](broken://pages/-M-tw-bZ6xb5OS9fzCnN)*\[]›*

### getDocument

▸ **getDocument**(`args`: object): *Promise‹*[*Document*](broken://pages/-M-tw-bZ6xb5OS9fzCnN)*›*

*Defined in* [*src/entities/SecurityToken/Documents.ts:61*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/SecurityToken/Documents.ts#L61)

Retrieve a specific document's data by name

**Parameters:**

▪ **args**: *object*

| Name   | Type   |
| ------ | ------ |
| `name` | string |

**Returns:** *Promise‹*[*Document*](broken://pages/-M-tw-bZ6xb5OS9fzCnN)*›*

### remove

▸ **remove**(`args`: object): *Promise‹*[*TransactionQueue*](broken://pages/-M-tw-_ttRjEt_eA5M8H)*‹*[*RemoveDocumentProcedureArgs*](broken://pages/-M-tw-cmh0jH2jei74nk)*, void››*

*Defined in* [*src/entities/SecurityToken/Documents.ts:50*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/SecurityToken/Documents.ts#L50)

Remove an existing document from the Security Token

**Parameters:**

▪ **args**: *object*

| Name   | Type   | Description             |
| ------ | ------ | ----------------------- |
| `name` | string | should always be unique |

**Returns:** *Promise‹*[*TransactionQueue*](broken://pages/-M-tw-_ttRjEt_eA5M8H)*‹*[*RemoveDocumentProcedureArgs*](broken://pages/-M-tw-cmh0jH2jei74nk)*, void››*

### set

▸ **set**(`args`: object): *Promise‹*[*TransactionQueue*](broken://pages/-M-tw-_ttRjEt_eA5M8H)*‹*[*SetDocumentProcedureArgs*](broken://pages/-M-tw-cr_rUsdPwCgFps)*, void››*

*Defined in* [*src/entities/SecurityToken/Documents.ts:37*](https://github.com/PolymathNetwork/polymath-sdk/blob/550676f/src/entities/SecurityToken/Documents.ts#L37)

Attach a new document to the contract, or update the URI or hash of an existing attached document

**Parameters:**

▪ **args**: *object*

| Name           | Type   | Description                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------- |
| `documentHash` | string | hash of the document's contents                                                         |
| `name`         | string | should always be unique                                                                 |
| `uri`          | string | off-chain uri of the document from where it is accessible to investors/advisors to read |

**Returns:** *Promise‹*[*TransactionQueue*](broken://pages/-M-tw-_ttRjEt_eA5M8H)*‹*[*SetDocumentProcedureArgs*](broken://pages/-M-tw-cr_rUsdPwCgFps)*, void››*
