# Integration Workflow

1. **Institution defines requirements**
   * Min KYC level
   * Jurisdiction allow/deny
   * Sanctions epoch freshness (must match latest)
   * Max KYC age (e.g. 6 months, 12 )
2. **User completes KYC off-chain**
   * Vault stores PII.
   * Cloud Agent records `kyc_verified_at`.
   * Proof posted to Midnight.
3. **Fairway updates Compliance UTXO**
   * New Merkle root.
   * `sanctions_epoch` incremented if needed.
   * `kyc_verified_at` attached per-leaf.
   * Signed by Fairway.
4. **User interacts with dApp**
   * Submits Merkle proof with leaf `{addr, claims, kyc_verified_at}`.
   * dApp attaches Compliance UTXO as reference input.
5. **Validator checks**

* [x] Merkle membership
* [x] Signature
* [x] `sanctions_epoch=latest`
* [x] `now - kyc_verified_at ≤ max_age`


---

# 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.fairway.global/developers/build-on-cardano/merkle-compliance-utxo/integration-workflow.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.
