# TransferRestrictionBase

Base class for managing Transfer Restrictions

## Type parameters

▪ **T**: [*TransferRestrictionType*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/enums/transferrestrictiontype.md)

## Hierarchy

* Namespace‹[Asset](/polymesh-sdk-api-reference/docs-beta/classes/asset.md)›

  ↳ **TransferRestrictionBase**

  ↳ [CountTransferRestriction](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/counttransferrestriction.md)

  ↳ [PercentageTransferRestriction](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/percentagetransferrestriction.md)

## Index

### Properties

* [context](#protected-context)
* [exemptedIds](#optional-exemptedids)
* [parent](#protected-parent)
* [type](#protected-abstract-type)

### Methods

* [addRestriction](#addrestriction)
* [get](#get)
* [removeRestrictions](#removerestrictions)
* [setRestrictions](#setrestrictions)

## Properties

### `Protected` context

• **context**: *Context*

*Inherited from void*

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

***

### `Optional` exemptedIds

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

*Defined in* [*src/types/index.ts:1234*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/types/index.ts#L1234)

array of Scope/Identity IDs that are exempted from the Restriction

**`note`** if the Asset requires investor uniqueness, Scope IDs are used. Otherwise, we use Identity IDs. More on Scope IDs and investor uniqueness [here](https://developers.polymesh.network/introduction/identity#polymesh-unique-identity-system-puis) and [here](https://developers.polymesh.network/polymesh-docs/primitives/confidential-identity)

***

### `Protected` parent

• **parent**: [*Asset*](/polymesh-sdk-api-reference/docs-beta/classes/asset.md)

*Inherited from void*

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

***

### `Protected` `Abstract` type

• **type**: *T*

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:59*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts#L59)

## Methods

### addRestriction

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

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:126*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts#L126)

Add a Transfer Restriction of the corresponding type to this Asset

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

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md), which means you can call [addRestriction.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                             |
| ------- | ---------------------------------------------------------------------------------------------------------------- |
| `args`  | [AddRestrictionParams](/polymesh-sdk-api-reference/docs-beta/globals.md#addrestrictionparams)‹T›                 |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md) |

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

***

### get

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

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:161*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts#L161)

Retrieve all active Transfer Restrictions of the corresponding type

**`note`** there is a maximum number of restrictions allowed across 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-beta/globals.md#getreturntype)*‹T››*

***

### removeRestrictions

▸ **removeRestrictions**(`opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹BigNumber››*

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:150*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts#L150)

Removes all Transfer Restrictions of the corresponding type from this Asset

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

**`note`** this method is of type [NoArgsProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/noargsproceduremethod.md), which means you can call [removeRestrictions.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/noargsproceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

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

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

***

### setRestrictions

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

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:138*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts#L138)

Sets all Transfer Restrictions of the corresponding type on this Asset

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

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md), which means you can call [setRestrictions.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                             |
| ------- | ---------------------------------------------------------------------------------------------------------------- |
| `args`  | [SetRestrictionsParams](/polymesh-sdk-api-reference/docs-beta/globals.md#setrestrictionsparams)‹T›               |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md) |

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


---

# 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-beta/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.
