> For the complete documentation index, see [llms.txt](https://sinqlarity.gitbook.io/sinqlarity-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sinqlarity.gitbook.io/sinqlarity-docs/contract-details/merkle-proof.md).

# MERKLE PROOF

### DESCRIPTION

The Merkle contract implements the generation and verification of Merkle proofs. It allows users to generate a Merkle hash for a set of data by providing an address and a nonce value. The contract also provides a function to verify a Merkle proof using the stored Merkle root and the user's generated hash. The verification checks if the provided proof is valid for the given hash and Merkle root.

### FUNCTIONS

1. **hash()**
2. **verify()**
3. **merkleRoot()**

### EXTRA PARAMETERS

**Contract Level :** Medium

**Utility Tags:** Merkle Proof, Data Integrity, Verification

1. **merkleRoot: bytes32(string)**

### USES

1. **Data Auditing:** The contract can be used for auditing purposes, where data can be hashed and verified against a Merkle root to ensure its integrity and authenticity.
2. **Distributed Systems:** Merkle proofs are commonly used in distributed systems to efficiently verify data without requiring the entire dataset to be available.
3. **Fraud Detection:** By generating and verifying Merkle proofs, the contract can be utilized to detect fraudulent or tampered data within a dataset.
4. **Immutable Data Structures:** Merkle trees and proofs are fundamental components of many immutable data structures, such as blockchain, where data integrity is critical.
5. **Cryptocurrency Exchanges:** Merkle proofs can be used in cryptocurrency exchanges to provide proof of ownership or balance without revealing sensitive information.
6. **Verification of State:** Merkle proofs make it easy to check the state of many systems, like blockchain-based smart contracts. This makes sure that the data is correct without having to reveal all of the data.
