# Policy Manager

### createHashIssuePolicy

```solidity
function createHashIssuePolicy(HashIssuePolicyParams _issueData_) external view returns (bytes32)
```

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

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

| Name        | Type                                            | Description                                          |
| ----------- | ----------------------------------------------- | ---------------------------------------------------- |
| *issueData* | [HashIssuePolicyParams](#hashissuepolicyparams) | The parameters of the issue 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 issue the policy. |

#### HashIssuePolicyParams

```solidity
struct HashIssuePolicyParams {
  address policyholder;
  string policyId;
  string externalReferenceId;
  string documentHash;
  uint40 coverageStart;
  uint40 coverageEnd;
  uint40 claimRequestUntil;
  uint256 premium;
  uint256 sumInsured;
  uint40 signatureValidUntil;
}
```

### createHashRedeemPolicy

```solidity
function createHashRedeemPolicy(HashRedeemPolicyParams _redeemData_) external view returns (bytes32)
```

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

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

| Name         | Type                                              | Description                                           |
| ------------ | ------------------------------------------------- | ----------------------------------------------------- |
| *redeemData* | [HashRedeemPolicyParams](#hashredeempolicyparams) | The parameters of the redeem 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 redeem the policy. |

#### HashRedeemPolicyParams

```solidity
struct HashRedeemPolicyParams {
  string policyId;
  uint8 redeemRate;
  uint8 riskCarrierRatio;
  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/policy-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.
