Class: Claims
api/client/Claims.Claims
Handles all Claims related functionality
Methods
addClaims
▸ addClaims(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Add claims to Identities
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
Parameters
Name | Type |
---|---|
args | Pick <ModifyClaimsParams , "claims" > |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
addInvestorUniquenessClaim
▸ addInvestorUniquenessClaim(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Add an Investor Uniqueness Claim to the signing Identity
Note
this method is of type ProcedureMethod, which means you can call addInvestorUniquenessClaim.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Parameters
Name | Type |
---|---|
args | AddInvestorUniquenessClaimParams |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
editClaims
▸ editClaims(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Edit claims associated to Identities (only the expiry date can be modified)
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
Parameters
Name | Type |
---|---|
args | Pick <ModifyClaimsParams , "claims" > |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
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
>[]>
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
[]>
getIdentitiesWithClaims
▸ getIdentitiesWithClaims(opts?
): Promise
<ResultSet
<IdentityWithClaims
>>
Retrieve a list of Identities with claims associated to them. Can be filtered using parameters
Note
supports pagination
Note
uses the middleware
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.claimTypes? | (Accredited | Affiliate | BuyLockup | SellLockup | CustomerDueDiligence | KnowYourCustomer | Jurisdiction | Exempted | Blocked | InvestorUniqueness | NoType | NoData )[] | types of the claims to fetch. Defaults to any type |
opts.includeExpired? | boolean | whether to include expired claims. Defaults to true |
opts.scope? | Scope | scope of the claims to fetch. Defaults to any scope |
opts.size? | BigNumber | page size |
opts.start? | BigNumber | page offset |
opts.targets? | (string | Identity )[] | Identities (or Identity IDs) for which to fetch targeting claims. Defaults to all targets |
opts.trustedClaimIssuers? | (string | Identity )[] | Identity IDs of claim issuers. Defaults to all claim issuers |
Returns
Promise
<ResultSet
<IdentityWithClaims
>>
getIdentitiesWithClaimsV2
▸ getIdentitiesWithClaimsV2(opts?
): Promise
<ResultSet
<IdentityWithClaims
>>
Retrieve a list of Identities with claims associated to them. Can be filtered using parameters
Note
supports pagination
Note
uses the middleware V2
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.claimTypes? | (Accredited | Affiliate | BuyLockup | SellLockup | CustomerDueDiligence | KnowYourCustomer | Jurisdiction | Exempted | Blocked | InvestorUniqueness | NoType | NoData )[] | types of the claims to fetch. Defaults to any type |
opts.includeExpired? | boolean | whether to include expired claims. Defaults to true |
opts.scope? | Scope | scope of the claims to fetch. Defaults to any scope |
opts.size? | BigNumber | page size |
opts.start? | BigNumber | page offset |
opts.targets? | (string | Identity )[] | Identities (or Identity IDs) for which to fetch targeting claims. Defaults to all targets |
opts.trustedClaimIssuers? | (string | Identity )[] | Identity IDs of claim issuers. Defaults to all claim issuers |
Returns
Promise
<ResultSet
<IdentityWithClaims
>>
getInvestorUniquenessClaims
▸ getInvestorUniquenessClaims(opts?
): Promise
<ClaimData
<InvestorUniquenessClaim
>[]>
Retrieve the list of InvestorUniqueness 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
<InvestorUniquenessClaim
>[]>
getIssuedClaims
▸ getIssuedClaims(opts?
): Promise
<ResultSet
<ClaimData
<Claim
>>>
Retrieve all claims issued by an Identity
Note
supports pagination
Note
uses the middleware
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.includeExpired? | boolean | whether to include expired claims. Defaults to true |
opts.size? | BigNumber | - |
opts.start? | BigNumber | - |
opts.target? | string | Identity | Identity (optional, defaults to the signing Identity) |
Returns
Promise
<ResultSet
<ClaimData
<Claim
>>>
getIssuedClaimsV2
▸ getIssuedClaimsV2(opts?
): Promise
<ResultSet
<ClaimData
<Claim
>>>
Retrieve all claims issued by an Identity
Note
supports pagination
Note
uses the middlewareV2
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.includeExpired? | boolean | whether to include expired claims. Defaults to true |
opts.size? | BigNumber | - |
opts.start? | BigNumber | - |
opts.target? | string | Identity | Identity (optional, defaults to the signing Identity) |
Returns
Promise
<ResultSet
<ClaimData
<Claim
>>>
getTargetingClaims
▸ getTargetingClaims(opts?
): Promise
<ResultSet
<IdentityWithClaims
>>
Retrieve all claims issued about an Identity, grouped by claim issuer
Note
supports pagination
Note
uses the middleware (optional)
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.includeExpired? | boolean | whether to include expired claims. Defaults to true |
opts.scope? | Scope | - |
opts.size? | BigNumber | - |
opts.start? | BigNumber | - |
opts.target? | string | Identity | Identity for which to fetch targeting claims (optional, defaults to the signing Identity) |
opts.trustedClaimIssuers? | (string | Identity )[] | - |
Returns
Promise
<ResultSet
<IdentityWithClaims
>>
getTargetingClaimsV2
▸ getTargetingClaimsV2(opts?
): Promise
<ResultSet
<IdentityWithClaims
>>
Retrieve all claims issued about an Identity, grouped by claim issuer
Note
supports pagination
Note
uses the middlewareV2 (optional)
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.includeExpired? | boolean | whether to include expired claims. Defaults to true |
opts.scope? | Scope | - |
opts.size? | BigNumber | - |
opts.start? | BigNumber | - |
opts.target? | string | Identity | Identity for which to fetch targeting claims (optional, defaults to the signing Identity) |
opts.trustedClaimIssuers? | (string | Identity )[] | - |
Returns
Promise
<ResultSet
<IdentityWithClaims
>>
revokeClaims
▸ revokeClaims(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Revoke claims from Identities
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 revokeClaims.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Parameters
Name | Type |
---|---|
args | Pick <ModifyClaimsParams , "claims" > |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>