# Claims

Handles all Claims related functionality

## Hierarchy

* **Claims**

## Index

### Methods

* [addClaims](#addclaims)
* [addInvestorUniquenessClaim](#addinvestoruniquenessclaim)
* [editClaims](#editclaims)
* [getCddClaims](#getcddclaims)
* [getClaimScopes](#getclaimscopes)
* [getIdentitiesWithClaims](#getidentitieswithclaims)
* [getInvestorUniquenessClaims](#getinvestoruniquenessclaims)
* [getIssuedClaims](#getissuedclaims)
* [getTargetingClaims](#gettargetingclaims)
* [revokeClaims](#revokeclaims)

## Methods

### addClaims

▸ **addClaims**(`args`: Pick‹[ModifyClaimsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#modifyclaimsparams), "claims"›, `opts?`: [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue)*‹void››*

*Defined in* [*src/Claims.ts:127*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L127)

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](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/proceduremethod), which means you can call `addClaims.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                    |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | Pick‹[ModifyClaimsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#modifyclaimsparams), "claims"› |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts)                        |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue)*‹void››*

### addInvestorUniquenessClaim

▸ **addInvestorUniquenessClaim**(`args`: [AddInvestorUniquenessClaimParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/addinvestoruniquenessclaimparams), `opts?`: [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue)*‹void››*

*Defined in* [*src/Claims.ts:114*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L114)

Add an Investor Uniqueness Claim to the current Identity

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/proceduremethod), which means you can call `addInvestorUniquenessClaim.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                                   | Description |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| `args`  | [AddInvestorUniquenessClaimParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/addinvestoruniquenessclaimparams) |             |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts)                                       | -           |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue)*‹void››*

### editClaims

▸ **editClaims**(`args`: Pick‹[ModifyClaimsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#modifyclaimsparams), "claims"›, `opts?`: [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue)*‹void››*

*Defined in* [*src/Claims.ts:140*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L140)

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](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/proceduremethod), which means you can call `editClaims.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                    |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | Pick‹[ModifyClaimsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#modifyclaimsparams), "claims"› |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts)                        |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue)*‹void››*

### getCddClaims

▸ **getCddClaims**(`opts`: object): *Promise‹*[*ClaimData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/claimdata)*‹*[*CddClaim*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#cddclaim)*›\[]›*

*Defined in* [*src/Claims.ts:310*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L310)

Retrieve the list of CDD claims for a target Identity

**Parameters:**

▪`Default value` **opts**: *object*= {}

| Name              | Type                                                                                                          | Description                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `includeExpired?` | undefined \| false \| true                                                                                    | whether to include expired claims. Defaults to true                                 |
| `target?`         | string \| [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/identity) | identity for which to fetch CDD claims (optional, defaults to the current Identity) |

**Returns:** *Promise‹*[*ClaimData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/claimdata)*‹*[*CddClaim*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#cddclaim)*›\[]›*

### getClaimScopes

▸ **getClaimScopes**(`opts`: object): *Promise‹*[*ClaimScope*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/claimscope)*\[]›*

*Defined in* [*src/Claims.ts:260*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L260)

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

▪`Default value` **opts**: *object*= {}

| Name      | Type                                                                                                          | Description                                                                           |
| --------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `target?` | string \| [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/identity) | identity for which to fetch claim scopes (optional, defaults to the current Identity) |

**Returns:** *Promise‹*[*ClaimScope*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/claimscope)*\[]›*

### getIdentitiesWithClaims

▸ **getIdentitiesWithClaims**(`opts`: object): *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/resultset)*‹*[*IdentityWithClaims*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/identitywithclaims)*››*

*Defined in* [*src/Claims.ts:201*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L201)

Retrieve a list of Identities with claims associated to them. Can be filtered using parameters

**`note`** supports pagination

**`note`** uses the middleware

**Parameters:**

▪`Default value` **opts**: *object*= {}

| Name                   | Type                                                                                                                                                                                                                                                                                                                                                         | Description                                                                               |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| `claimTypes?`          | [Exclude](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/enums/targettreatment#exclude)‹[ClaimType](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/enums/claimtype), [InvestorUniquenessV2](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/enums/claimtype#investoruniquenessv2)›\[] | types of the claims to fetch. Defaults to any type                                        |
| `includeExpired?`      | undefined \| false \| true                                                                                                                                                                                                                                                                                                                                   | whether to include expired claims. Defaults to true                                       |
| `scope?`               | [Scope](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/scope)                                                                                                                                                                                                                                                             | scope of the claims to fetch. Defaults to any scope                                       |
| `size?`                | undefined \| number                                                                                                                                                                                                                                                                                                                                          | page size                                                                                 |
| `start?`               | undefined \| number                                                                                                                                                                                                                                                                                                                                          | page offset                                                                               |
| `targets?`             | (string \| [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/identity)‹›)\[]                                                                                                                                                                                                                                         | identities (or Identity IDs) for which to fetch claims (targets). Defaults to all targets |
| `trustedClaimIssuers?` | (string \| [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/identity)‹›)\[]                                                                                                                                                                                                                                         | identity IDs of claim issuers. Defaults to all claim issuers                              |

**Returns:** *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/resultset)*‹*[*IdentityWithClaims*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/identitywithclaims)*››*

### getInvestorUniquenessClaims

▸ **getInvestorUniquenessClaims**(`opts`: object): *Promise‹*[*ClaimData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/claimdata)*‹*[*InvestorUniquenessClaim*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#investoruniquenessclaim)*›\[]›*

*Defined in* [*src/Claims.ts:334*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L334)

Retrieve the list of InvestorUniqueness claims for a target Identity

**Parameters:**

▪`Default value` **opts**: *object*= {}

| Name              | Type                                                                                                          | Description                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `includeExpired?` | undefined \| false \| true                                                                                    | whether to include expired claims. Defaults to true                                 |
| `target?`         | string \| [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/identity) | identity for which to fetch CDD claims (optional, defaults to the current Identity) |

**Returns:** *Promise‹*[*ClaimData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/claimdata)*‹*[*InvestorUniquenessClaim*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#investoruniquenessclaim)*›\[]›*

### getIssuedClaims

▸ **getIssuedClaims**(`opts`: object): *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/resultset)*‹*[*ClaimData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/claimdata)*››*

*Defined in* [*src/Claims.ts:166*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L166)

Retrieve all claims issued by an Identity

**`note`** supports pagination

**`note`** uses the middleware

**Parameters:**

▪`Default value` **opts**: *object*= {}

| Name              | Type                                                                                                          | Description                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| `includeExpired?` | undefined \| false \| true                                                                                    | whether to include expired claims. Defaults to true   |
| `size?`           | undefined \| number                                                                                           | -                                                     |
| `start?`          | undefined \| number                                                                                           | -                                                     |
| `target?`         | string \| [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/identity) | identity (optional, defaults to the current Identity) |

**Returns:** *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/resultset)*‹*[*ClaimData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/claimdata)*››*

### getTargetingClaims

▸ **getTargetingClaims**(`opts`: object): *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/resultset)*‹*[*IdentityWithClaims*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/identitywithclaims)*››*

*Defined in* [*src/Claims.ts:361*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L361)

Retrieve all claims issued about an Identity, grouped by claim issuer

**`note`** supports pagination

**`note`** uses the middleware (optional)

**Parameters:**

▪`Default value` **opts**: *object*= {}

| Name                   | Type                                                                                                                 | Description                                                                               |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `includeExpired?`      | undefined \| false \| true                                                                                           | whether to include expired claims. Defaults to true                                       |
| `scope?`               | [Scope](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/scope)                     | -                                                                                         |
| `size?`                | undefined \| number                                                                                                  | -                                                                                         |
| `start?`               | undefined \| number                                                                                                  | -                                                                                         |
| `target?`              | string \| [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/identity)        | identity for which to fetch targeting claims (optional, defaults to the current Identity) |
| `trustedClaimIssuers?` | (string \| [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/identity)‹›)\[] | -                                                                                         |

**Returns:** *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/resultset)*‹*[*IdentityWithClaims*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/identitywithclaims)*››*

### revokeClaims

▸ **revokeClaims**(`args`: Pick‹[ModifyClaimsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#modifyclaimsparams), "claims"›, `opts?`: [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue)*‹void››*

*Defined in* [*src/Claims.ts:153*](https://github.com/PolymathNetwork/polymesh-sdk/blob/7362b318/src/Claims.ts#L153)

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](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/proceduremethod), which means you can call `revokeClaims.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                    |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | Pick‹[ModifyClaimsParams](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/globals#modifyclaimsparams), "claims"› |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/interfaces/procedureopts)                        |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v8/classes/transactionqueue)*‹void››*
