-
Notifications
You must be signed in to change notification settings - Fork 11
api.client.Claims.Claims
api/client/Claims.Claims
Handles all Claims related functionality
- addClaims
- editClaims
- getAllCustomClaimTypes
- getCddClaims
- getClaimScopes
- getCustomClaimTypeById
- getCustomClaimTypeByName
- getIdentitiesWithClaims
- getIssuedClaims
- getTargetingClaims
- registerCustomClaimType
- revokeClaims
▸ addClaims(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Add claims to Identities
Name | Type |
---|---|
args |
Pick <ModifyClaimsParams , "claims" > |
opts? |
ProcedureOpts |
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
▸ editClaims(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Edit claims associated to Identities (only the expiry date can be modified)
Name | Type |
---|---|
args |
Pick <ModifyClaimsParams , "claims" > |
opts? |
ProcedureOpts |
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
▸ getAllCustomClaimTypes(opts?
): Promise
<ResultSet
<CustomClaimTypeWithDid
>>
Retrieve registered CustomClaimTypes
Name | Type | Description |
---|---|---|
opts |
Object |
- |
opts.dids? |
string [] |
Fetch CustomClaimTypes issued by the given dids
|
opts.size? |
BigNumber |
- |
opts.start? |
BigNumber |
- |
Promise
<ResultSet
<CustomClaimTypeWithDid
>>
Note
supports pagination
Note
uses the middlewareV2 (Required)
▸ getCddClaims(opts?
): Promise
<ClaimData
<CddClaim
>[]>
Retrieve the list of CDD claims for a target Identity
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) |
Promise
<ClaimData
<CddClaim
>[]>
▸ 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
Name | Type | Description |
---|---|---|
opts |
Object |
- |
opts.target? |
string | Identity
|
Identity for which to fetch claim scopes (optional, defaults to the signing Identity) |
Promise
<ClaimScope
[]>
▸ getCustomClaimTypeById(id
): Promise
<null
| CustomClaimType
>
Retrieves a custom claim type based on its ID
Name | Type | Description |
---|---|---|
id |
BigNumber |
The ID of the custom claim type to retrieve |
Promise
<null
| CustomClaimType
>
▸ getCustomClaimTypeByName(name
): Promise
<null
| CustomClaimType
>
Retrieves a custom claim type based on its name
Name | Type | Description |
---|---|---|
name |
string |
The name of the custom claim type to retrieve |
Promise
<null
| CustomClaimType
>
▸ getIdentitiesWithClaims(opts?
): Promise
<ResultSet
<IdentityWithClaims
>>
Retrieve a list of Identities with claims associated to them. Can be filtered using parameters
Name | Type | Description |
---|---|---|
opts |
Object |
- |
opts.claimTypes? |
ClaimType [] |
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 |
Promise
<ResultSet
<IdentityWithClaims
>>
Note
supports pagination
Note
uses the middleware V2
▸ getIssuedClaims(opts?
): Promise
<ResultSet
<ClaimData
<Claim
>>>
Retrieve all claims issued by an Identity
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) |
Promise
<ResultSet
<ClaimData
<Claim
>>>
Note
supports pagination
Note
uses the middlewareV2
▸ getTargetingClaims(opts?
): Promise
<ResultSet
<IdentityWithClaims
>>
Retrieve all claims issued about an Identity, grouped by claim issuer
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 )[] |
- |
Promise
<ResultSet
<IdentityWithClaims
>>
Note
supports pagination
Note
uses the middlewareV2 (optional)
▸ registerCustomClaimType(args
, opts?
): Promise
<GenericPolymeshTransaction
<BigNumber
, BigNumber
>>
Creates a custom claim type using the name
and returns the id
of the created claim type
Name | Type |
---|---|
args |
RegisterCustomClaimTypeParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<BigNumber
, BigNumber
>>
Throws
if
- the
name
is longer than allowed - a custom claim type with the same
name
already exists
Note
this method is of type ProcedureMethod, which means you can call registerCustomClaimType.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
▸ revokeClaims(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Revoke claims from Identities
Name | Type |
---|---|
args |
Pick <ModifyClaimsParams , "claims" > |
opts? |
ProcedureOpts |
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 revokeClaims.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Entities
- Account
- Asset
- Authorization Request
- Checkpoint
- Checkpoint Schedule
- Corporate Action
- Corporate Action Base
- Custom Permission Group
- Default Portfolio
- Default Trusted Claim Issuer
- Dividend Distribution
- Entity
- Identity
- Instruction
- Known Permission Group
- Metadata Entry
- Multi Sig Proposal
- Numbered Portfolio
- Offering
- Permission Group
- Portfolio
- Subsidies
- Subsidy
- Ticker Reservation
- Venue
- Authorizations
- Types