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:64

Handles all Transfer Restriction related functionality.

Extends

Methods

addExemptions()

addExemptions(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:704

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:641

Return identities with exemptions.

Returns

Promise<TransferRestrictionExemption[]>

getRestrictions()

getRestrictions(): Promise<ActiveTransferRestrictions>

Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:141

Get all current restrictions for this asset.

Returns

Promise<ActiveTransferRestrictions>

getStats()

getStats(): Promise<AssetStat[]>

Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:161

Return active asset stats.

Returns

Promise<AssetStat[]>

getValues()

getValues(): Promise<TransferRestrictionStatValues[]>

Defined in: api/entities/Asset/Fungible/TransferRestrictions/index.ts:501

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:711

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:684

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:699

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