Class: TransferRestrictions
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:55
Handles all Transfer Restriction related functionality.
Extends
Namespace
<FungibleAsset
>
Methods
addExemptions()
addExemptions(
args
:TransferRestrictionExemptionParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:489
Exempt identities from Transfer Restrictions. These identities will not be subject to Transfer Restriction rules.
Parameters
Parameter | Type |
---|---|
| |
|
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type ProcedureMethod, which means you can call addExemptions.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
getExemptions()
getExemptions():
Promise
<TransferRestrictionExemption
[]>
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:432
Return identities with exemptions.
Returns
Promise
<TransferRestrictionExemption
[]>
getRestrictions()
getRestrictions():
Promise
<ActiveTransferRestrictions
>
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:130
Get all current restrictions for this asset.
Returns
Promise
<ActiveTransferRestrictions
>
getStats()
getStats():
Promise
<AssetStat
[]>
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:150
Return active asset stats.
Returns
Promise
<AssetStat
[]>
getValues()
getValues():
Promise
<TransferRestrictionStatValues
[]>
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:299
Get the values of all active transfer restrictions for this Asset
Returns
Promise
<TransferRestrictionStatValues
[]>
an array of objects containing the values of all active transfer restrictions for this Asset
removeExemptions()
removeExemptions(
args
:TransferRestrictionExemptionParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:496
Remove identities from Transfer Restriction exemptions.
The given identities will no longer be exempt from Transfer Restrictions.
Parameters
Parameter | Type |
---|---|
| |
|
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type ProcedureMethod, which means you can call removeExemptions.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
setRestrictions()
setRestrictions(
args
:TransferRestrictionParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:469
Set all Transfer Restrictions on this Asset.
Transfer Restrictions control ownership requirements based on investor statistics. For example, TransferRestrictionType.Count can limit the number of investors. TransferRestrictionType.Percentage can limit the maximum percentage an individual investor may hold.
Parameters
Parameter | Type |
---|---|
| |
|
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
The relevant stat must be enabled by including it in setStats before the restriction can be created.
Note
this method is of type ProcedureMethod, which means you can call setRestrictions.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
setStats()
setStats(
args
:SetTransferRestrictionStatParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Fungible/TransferRestrictions/index.ts:484
Set the enabled statistics for an Asset.
Transfer Restrictions require the relevant stat to be enabled before they can be set. Calling this method will override the currently enabled stats with the provided set, which means it can also be used to remove previously enabled stats.
Parameters
Parameter | Type |
---|---|
| |
|
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
If you attempt to remove a stat that is currently required by an active transfer restriction, the chain will throw an error.
Note
Count-based stats must be given an initial value. The counter is only updated automatically with each transfer of tokens after the stat has been enabled. As such, the initial value for the stat should be passed in, which can be fetched with FungibleAsset.investorCount.
Note
this method is of type ProcedureMethod, which means you can call setStats.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it