api.entities.Asset.Fungible.TransferRestrictions - PolymeshAssociation/polymesh-sdk GitHub Wiki
@polymeshassociation/polymesh-sdk / api/entities/Asset/Fungible/TransferRestrictions
api/entities/Asset/Fungible/TransferRestrictions
Classes
TransferRestrictions
Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:60
Handles all Transfer Restriction related functionality.
Extends
Namespace<FungibleAsset>
Methods
addExemptions()
addExemptions(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:614
Exempt identities from Transfer Restrictions. These identities will not be subject to Transfer Restriction rules.
Parameters
| Parameter | Type |
|---|---|
args |
TransferRestrictionExemptionParams |
opts? |
ProcedureOpts |
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: api/entities/Asset/Fungible/TransferRestrictions/index.ts:544
Return every Identity exempt from a Transfer Restriction on this Asset, whether or not a restriction currently uses the exemption
Returns
Promise<TransferRestrictionExemption[]>
Note
the chain only consults an exemption keyed by Count or Balance, either with no claim
or with one of the claims a statistic can be scoped by (Accredited, Affiliate or
Jurisdiction). Those eight keys are read. An exemption stored under any other claim type
never exempts anyone, and is not returned
getRestrictions()
getRestrictions():
Promise<ActiveTransferRestrictions>
Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:137
Get all current restrictions for this asset.
Returns
Promise<ActiveTransferRestrictions>
getStats()
getStats():
Promise<AssetStat[]>
Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:157
Return active asset stats.
Returns
Promise<AssetStat[]>
getValues()
getValues():
Promise<TransferRestrictionStatValues[]>
Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:497
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,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:621
Remove identities from Transfer Restriction exemptions.
The given identities will no longer be exempt from Transfer Restrictions.
Parameters
| Parameter | Type |
|---|---|
args |
TransferRestrictionExemptionParams |
opts? |
ProcedureOpts |
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,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:594
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 |
|---|---|
args |
TransferRestrictionParams |
opts? |
ProcedureOpts |
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,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:609
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 |
|---|---|
args |
SetTransferRestrictionStatParams |
opts? |
ProcedureOpts |
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