Skip to main content
Version: 30.0.x

Class: Requirements

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:39

Handles all Asset Compliance Requirements related functionality

Extends

Methods

add()

add(args: AddAssetRequirementParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:88

Add a new compliance requirement to the the Asset. This doesn't modify existing requirements

Parameters

ParameterType

args

AddAssetRequirementParams

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type ProcedureMethod, which means you can call add.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


arePaused()

arePaused(): Promise<boolean>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:197

Check whether Asset compliance requirements are paused or not

Returns

Promise<boolean>


get()

Call Signature

get(): Promise<ComplianceRequirements>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:108

Retrieve all of the Asset's compliance requirements, together with the Default Trusted Claim Issuers

Returns

Promise<ComplianceRequirements>

Promise that resolves to the compliance requirements and trusted claim issuers

Call Signature

get(callback: SubCallback<ComplianceRequirements>): Promise<UnsubCallback>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:118

Retrieve all of the Asset's compliance requirements, together with the Default Trusted Claim Issuers

Parameters
ParameterTypeDescription

callback

SubCallback<ComplianceRequirements>

Callback function that receives compliance requirements updates

Returns

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note

can be subscribed to, if connected to node using a web socket


modify()

modify(args: ModifyComplianceRequirementParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:218

Modify a compliance requirement for the Asset

Parameters

ParameterType

args

ModifyComplianceRequirementParams

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type ProcedureMethod, which means you can call modify.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


pause()

pause(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:187

Pause all the Asset's requirements. This means that all transfers will be allowed until requirements are unpaused

Parameters

ParameterType

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type NoArgsProcedureMethod, which means you can call pause.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


remove()

remove(args: RemoveAssetRequirementParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:93

Remove an existing compliance requirement from the Asset

Parameters

ParameterType

args

RemoveAssetRequirementParams

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type ProcedureMethod, which means you can call remove.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


reset()

reset(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:182

Delete all the current requirements for the Asset.

Parameters

ParameterType

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type NoArgsProcedureMethod, which means you can call reset.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


set()

set(args: SetAssetRequirementsParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:101

Configure compliance requirements for the Asset. This operation will replace all existing requirements with a new requirement set

Parameters

ParameterType

args

SetAssetRequirementsParams

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Example

Say A, B, C, D and E are requirements and we arrange them as `[[A, B], [C, D], [E]]`.
For a transfer to succeed, it must either comply with A AND B, C AND D, OR E.

Note

this method is of type ProcedureMethod, which means you can call set.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


unpause()

unpause(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Compliance/Requirements.ts:192

Un-pause all the Asset's current requirements

Parameters

ParameterType

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type NoArgsProcedureMethod, which means you can call unpause.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it