# TransferRestrictionBase

Base class for managing Transfer Restrictions

## Type parameters

▪ **T**: [*TransferRestrictionType*](/polymesh-sdk-api-reference/docs-v8/enums/transferrestrictiontype.md)

## Hierarchy

* Namespace‹[SecurityToken](/polymesh-sdk-api-reference/docs-v8/classes/securitytoken.md)›

  ↳ **TransferRestrictionBase**

  ↳ [Count](/polymesh-sdk-api-reference/docs-v8/classes/count.md)

  ↳ [Percentage](/polymesh-sdk-api-reference/docs-v8/classes/percentage.md)

## Index

### Properties

* [context](/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md#protected-context)
* [exemptedScopeIds](/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md#optional-exemptedscopeids)
* [parent](/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md#protected-parent)
* [type](/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md#protected-abstract-type)

### Methods

* [addRestriction](/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md#addrestriction)
* [get](/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md#get)
* [removeRestrictions](/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md#removerestrictions)
* [setRestrictions](/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md#setrestrictions)

## Properties

### `Protected` context

• **context**: [*Context*](/polymesh-sdk-api-reference/docs-v8/classes/context.md)

*Inherited from void*

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

### `Optional` exemptedScopeIds

• **exemptedScopeIds**? : *string\[]*

*Defined in* [*src/types/index.ts:937*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/types/index.ts#L937)

array of Scope IDs that are exempted from the Restriction

### `Protected` parent

• **parent**: [*SecurityToken*](/polymesh-sdk-api-reference/docs-v8/classes/securitytoken.md)

*Inherited from void*

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

### `Protected` `Abstract` type

• **type**: *T*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:56*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L56)

## Methods

### addRestriction

▸ **addRestriction**(`args`: [AddRestrictionParams](/polymesh-sdk-api-reference/docs-v8/globals.md#addrestrictionparams)‹T›, `opts?`: [ProcedureOpts](/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue.md)*‹number››*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:123*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L123)

Add a Transfer Restriction of the corresponding type to this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** this method is of type [ProcedureMethod](/polymesh-sdk-api-reference/docs-v8/interfaces/proceduremethod.md), which means you can call `addRestriction.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                           |
| ------- | ---------------------------------------------------------------------------------------------- |
| `args`  | [AddRestrictionParams](/polymesh-sdk-api-reference/docs-v8/globals.md#addrestrictionparams)‹T› |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts.md)               |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue.md)*‹number››*

### get

▸ **get**(): *Promise‹*[*GetReturnType*](/polymesh-sdk-api-reference/docs-v8/globals.md#getreturntype)*‹T››*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:158*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L158)

Retrieve all active Transfer Restrictions of the corresponding type

**`note`** there is a maximum number of restrictions allowed accross all types. The `availableSlots` property of the result represents how many more restrictions can be added before reaching that limit

**Returns:** *Promise‹*[*GetReturnType*](/polymesh-sdk-api-reference/docs-v8/globals.md#getreturntype)*‹T››*

### removeRestrictions

▸ **removeRestrictions**(`args`: void, `opts?`: [ProcedureOpts](/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue.md)*‹number››*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:147*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L147)

Removes all Transfer Restrictions of the corresponding type from this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** this method is of type [ProcedureMethod](/polymesh-sdk-api-reference/docs-v8/interfaces/proceduremethod.md), which means you can call `removeRestrictions.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                             |
| ------- | -------------------------------------------------------------------------------- |
| `args`  | void                                                                             |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts.md) |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue.md)*‹number››*

### setRestrictions

▸ **setRestrictions**(`args`: [SetRestrictionsParams](/polymesh-sdk-api-reference/docs-v8/globals.md#setrestrictionsparams)‹T›, `opts?`: [ProcedureOpts](/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue.md)*‹number››*

*Defined in* [*src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts:135*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/api/entities/SecurityToken/TransferRestrictions/TransferRestrictionBase.ts#L135)

Sets all Transfer Restrictions of the corresponding type on this Security Token

**`note`** the result is the total amount of restrictions after the procedure has run

**`note`** this method is of type [ProcedureMethod](/polymesh-sdk-api-reference/docs-v8/interfaces/proceduremethod.md), which means you can call `setRestrictions.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                             |
| ------- | ------------------------------------------------------------------------------------------------ |
| `args`  | [SetRestrictionsParams](/polymesh-sdk-api-reference/docs-v8/globals.md#setrestrictionsparams)‹T› |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts.md)                 |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue.md)*‹number››*


---

# Agent Instructions: 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:

```
GET https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transferrestrictionbase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
