PHP code example of blume01 / merkle-tree
1. Go to this page and download the library: Download blume01/merkle-tree library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
blume01 / merkle-tree example snippets
use MerkleTree\MerkleTree;
// 🔹 Dados para construir a árvore Merkle
$dados = ["bloco1", "bloco2", "bloco3", "bloco4"];
// 🔹 Criando a Merkle Tree
$merkleTree = new MerkleTree($dados);
// 🔹 Obtendo e exibindo a raiz da árvore
echo $merkleTree->getRootHash();