# TransferRestrictionBase

Base class for managing Transfer Restrictions

## Type parameters

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

## Hierarchy

* Namespace‹[Asset](https://developers.polymath.network/polymesh-sdk-api-reference/classes/asset)›

  ↳ **TransferRestrictionBase**

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

  ↳ [PercentageTransferRestriction](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/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/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Namespace.ts#L11)

***

### `Optional` exemptedIds

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

*Defined in* [*src/types/index.ts:1225*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/types/index.ts#L1225)

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*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/asset)

*Inherited from void*

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

***

### `Protected` `Abstract` type

• **type**: *T*

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

## Methods

### addRestriction

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

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:126*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/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/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md), which means you can call [addRestriction.checkAuthorization](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/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](https://developers.polymath.network/polymesh-sdk-api-reference/globals#addrestrictionparams)‹T› |
| `opts?` | [ProcedureOpts](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)    |

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

***

### get

▸ **get**(): *Promise‹*[*GetReturnType*](https://developers.polymath.network/polymesh-sdk-api-reference/globals#getreturntype)*‹T››*

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:161*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/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*](https://developers.polymath.network/polymesh-sdk-api-reference/globals#getreturntype)*‹T››*

***

### removeRestrictions

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

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:150*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/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/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/noargsproceduremethod.md), which means you can call [removeRestrictions.checkAuthorization](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/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/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md) |

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

***

### setRestrictions

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

*Defined in* [*src/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.ts:138*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/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/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md), which means you can call [setRestrictions.checkAuthorization](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/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](https://developers.polymath.network/polymesh-sdk-api-reference/globals#setrestrictionsparams)‹T› |
| `opts?` | [ProcedureOpts](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)      |

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