Download the PHP package pleonasm/merkle-tree without Composer

On this page you can find all versions of the php package pleonasm/merkle-tree. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package merkle-tree

Merkle Tree Implementation

Build Status Coverage Status

This is an implementation of a hash tree or Merkle Tree for PHP.

Install

Install via Composer (make sure you have composer in your path or in your project).

Put the following in your package.json:

Then run composer install.

Usage For A Fixed Size Tree

Usage of a hash tree requires a user to provide a hashing function that each node will use to do its hashing. This function must accept a single string argument and must always return a string. It should never throw an exception.

If desired, you can also provide a callback for when the entire hash tree has been actually finished, rather than checking for it each time yourself.

The FixedSizeTree implements a Merkle Tree the same way bitcoins do. There are other ways to actually deal with a tree width that is not a perfect square.

If there is a need for the other method, I would not be opposed to adding it.

Upgrading from 1.0

The difference between 1.0 and 2.0 from the outside should be very minimal. If you're only using the public interface of FixedSizeTree minus a few error handling changes, then you should be good to go.

The new implementation is greatly simplified and is far faster for large trees. My latest benchmark put 1.0 taking 100 seconds to fill a 10000 item tree while 2.0 takes 0.2 seconds.

That said, it is technically a backwards incompatible change so a major version bump is in order.

License

You can find the license for this code in the LICENSE file


All versions of merkle-tree with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pleonasm/merkle-tree contains the following files

Loading the files please wait ....