This repository contains a simple Go implementation of Merkle trees and a simulation to detect API breaking changes using Merkle trees. Inspired by ApiToolKit by Anthony Alaribe, this project demonstrates how Merkle trees can be used to efficiently and securely verify data integrity and detect changes in API responses.
In the web3 and blockchain world, Merkle trees, or hash trees, are commonly used to ensure data integrity and secure data transfer. This project demonstrates a simple Go implementation of Merkle trees and how they can be used to detect breaking changes in API responses.
A Merkle tree is a hierarchical data structure where each leaf node represents a hashed value of a piece of data, and each non-leaf node is a hash of its child nodes. This structure allows for efficient and secure verification of data integrity.
graph TD
A[Root]
A --> B[Child 1]
A --> C[Child 2]
B --> D[Child 1.1]
B --> E[Child 1.2]
C --> F[Child 2.1]
C --> G[Child 2.2]
E --> H[Child 1.2.1]
E --> I[Child 1.2.2]
Clone the repository:
git clone https://github.com/yourusername/merkle-tree-api-detector.git
cd merkle-tree-api-detector
To run the simulation:
- Ensure you have Go installed.
- Navigate to the project directory.
- Run the following command:
go run .
This will simulate API calls, build Merkle trees, and detect any breaking changes in the API responses.
This project is licensed under the MIT License. See the LICENSE file for details.
This `README.md` provides a comprehensive guide for anyone looking to understand, use, and run the Merkle tree implementation and API change detection simulation.