> For the complete documentation index, see [llms.txt](https://docs.covestlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.covestlabs.com/covest-insaas-protocol/insaas-smart-contracts/operator/claim-manager.md).

# Claim Manager

### getClaimRules

```solidity
function getClaimRules() external view returns (ClaimRules)
```

Get the claim rules.

| Name | Type                                                                                         | Description      |
| ---- | -------------------------------------------------------------------------------------------- | ---------------- |
| \[0] | [ClaimRules](/covest-insaas-protocol/insaas-smart-contracts/claim-case-states.md#claimrules) | The claim rules. |

### setClaimRules

```solidity
function setClaimRules(ClaimRules _cr_) external
```

Set the claim rules.

Requirements:

* `msg.sender` - The caller must have the role of `SUPER_MANAGER_LEVEL`.

Events:

* `ClaimRulesChanged` Emitted when the claim rules are changed successfully.

| Name | Type                                                                                         | Description      |
| ---- | -------------------------------------------------------------------------------------------- | ---------------- |
| *cr* | [ClaimRules](/covest-insaas-protocol/insaas-smart-contracts/claim-case-states.md#claimrules) | The claim rules. |

#### ClaimRulesChanged

```solidity
event ClaimRulesChanged(ClaimRules claimRules)
```

This event is emitted when the claim rules are changed.

| Name       | Type                                                                                         | Description      |
| ---------- | -------------------------------------------------------------------------------------------- | ---------------- |
| claimRules | [ClaimRules](/covest-insaas-protocol/insaas-smart-contracts/claim-case-states.md#claimrules) | The claim rules. |

### getClaimLength

```solidity
function getClaimLength() external view returns (uint256)
```

Get the claim length.

| Name | Type    | Description       |
| ---- | ------- | ----------------- |
| \[0] | uint256 | The claim length. |

### createHashSubmitClaim

```solidity
function createHashSubmitClaim(HashSubmitClaimParams _claimData_) external view returns (bytes32)
```

Create hash that verifier will sign and give it to user for submit claim policy.

*Generates a hash of the parameters required for the verifier to sign the message and provide the signature to the user for the submit claim policy.*

| Name        | Type                                            | Description                                                 |
| ----------- | ----------------------------------------------- | ----------------------------------------------------------- |
| *claimData* | [HashSubmitClaimParams](#hashsubmitclaimparams) | The parameters of the submit claim policy are to be hashed. |

| Name | Type    | Description                                                                                                                  |
| ---- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| \[0] | bytes32 | The hash of the required parameters, which can then be used to generate a signature for the user to submit claim the policy. |

#### HashSubmitClaimParams

```solidity
struct HashSubmitClaimParams {
  string policyId;
  string documentHash;
  uint256 claimAmount;
  uint40 signatureValidUntil;
}
```
