# 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;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.covestlabs.com/covest-insaas-protocol/insaas-smart-contracts/operator/claim-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
