Class: Claims
api/client/Claims.Claims
Handles all Claims related functionality
Methods
addClaims
▸ addClaims(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Add claims to Identities
Parameters
Name | Type |
---|---|
args | Pick <ModifyClaimsParams , "claims" > |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
required roles:
- Customer Due Diligence Provider: if there is at least one CDD claim in the arguments
Note
this method is of type ProcedureMethod, which means you can call addClaims.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Defined in
editClaims
▸ editClaims(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Edit claims associated to Identities (only the expiry date can be modified)
Parameters
Name | Type |
---|---|
args | Pick <ModifyClaimsParams , "claims" > |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
required roles:
- Customer Due Diligence Provider: if there is at least one CDD claim in the arguments
Note
this method is of type ProcedureMethod, which means you can call editClaims.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Defined in
getAllCustomClaimTypes
▸ getAllCustomClaimTypes(opts?
): Promise
<ResultSet
<CustomClaimTypeWithDid
>>
Retrieve registered CustomClaimTypes
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.dids? | string [] | Fetch CustomClaimTypes issued by the given dids |
opts.size? | BigNumber | - |
opts.start? | BigNumber | - |
Returns
Promise
<ResultSet
<CustomClaimTypeWithDid
>>
Note
supports pagination
Note
uses the middlewareV2 (Required)
Defined in
getCddClaims
▸ getCddClaims(opts?
): Promise
<ClaimData
<CddClaim
>[]>
Retrieve the list of CDD claims for a target Identity
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.includeExpired? | boolean | whether to include expired claims. Defaults to true |
opts.target? | string | Identity | Identity for which to fetch CDD claims (optional, defaults to the signing Identity) |
Returns
Promise
<ClaimData
<CddClaim
>[]>
Defined in
getClaimScopes
▸ getClaimScopes(opts?
): Promise
<ClaimScope
[]>
Retrieve all scopes in which claims have been made for the target Identity. If the scope is an asset DID, the corresponding ticker is returned as well
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.target? | string | Identity | Identity for which to fetch claim scopes (optional, defaults to the signing Identity) |
Returns
Promise
<ClaimScope
[]>
Defined in
getCustomClaimTypeById
▸ getCustomClaimTypeById(id
): Promise
<null
| CustomClaimType
>
Retrieves a custom claim type based on its ID
Parameters
Name | Type | Description |
---|---|---|
id | BigNumber | The ID of the custom claim type to retrieve |
Returns
Promise
<null
| CustomClaimType
>
Defined in
getCustomClaimTypeByName
▸ getCustomClaimTypeByName(name
): Promise
<null
| CustomClaimType
>
Retrieves a custom claim type based on its name
Parameters
Name | Type | Description |
---|---|---|
name | string | The name of the custom claim type to retrieve |