https://github.com/drupol/phpmerkle
A fast and dynamic Merkle tree implementation
https://github.com/drupol/phpmerkle
Last synced: 7 months ago
JSON representation
A fast and dynamic Merkle tree implementation
- Host: GitHub
- URL: https://github.com/drupol/phpmerkle
- Owner: drupol
- License: mit
- Created: 2018-11-28T16:19:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-11T07:43:55.000Z (over 6 years ago)
- Last Synced: 2025-02-01T20:45:00.865Z (over 1 year ago)
- Language: PHP
- Size: 212 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://packagist.org/packages/drupol/phpmerkle)
[](https://packagist.org/packages/drupol/phpmerkle)
[](https://packagist.org/packages/drupol/phpmerkle)
[](https://github.com/drupol/phpmerkle/actions)
[](https://scrutinizer-ci.com/g/drupol/phpmerkle/?branch=master)
[](https://scrutinizer-ci.com/g/drupol/phpmerkle/?branch=master)
[](https://stryker-mutator.github.io)
[](https://phpmerkle.readthedocs.io/)
[](https://packagist.org/packages/drupol/phpmerkle)
[](https://saythanks.io/to/drupol)
[](https://paypal.me/drupol)
# PhpMerkle
A fast PHP implementation of the [Merkle tree](https://en.wikipedia.org/wiki/Merkle_tree) using simple arrays.
## Documentation
TODO.
## Requirements
* PHP >= 7.1
## Installation
```composer require drupol/phpmerkle```
## Usage
The object has to be used just like a regular array.
```php
hash(); // c689102cdf2a5b30c2e21fdad85e4bb401085227aff672a7240ceb3410ff1fb6
```
## Code quality, tests and benchmarks
Every time changes are introduced into the library, [Github](https://github.com/drupol/phpmerkle/actions) run the tests and the benchmarks.
The library has tests written with [PHPSpec](http://www.phpspec.net/).
Feel free to check them out in the `spec` directory. Run `composer phpspec` to trigger the tests.
Before each commit some inspections are executed with [GrumPHP](https://github.com/phpro/grumphp), run `./vendor/bin/grumphp run` to check manually.
[PHPBench](https://github.com/phpbench/phpbench) is used to benchmark the library, to run the benchmarks: `composer bench`
[PHPInfection](https://github.com/infection/infection) is used to ensure that your code is properly tested, run `composer infection` to test your code.
## Contributing
Feel free to contribute to this library by sending Github pull requests. I'm quite reactive :-)