jurruh/blockchain

There is no license information available for the latest version (0.0.1) of this package.

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

pkg:composer/jurruh/blockchain

0.0.1 2017-12-09 18:05 UTC

This package is not auto-updated.

Last update: 2025-12-21 09:19:10 UTC


README

This repository contains a basic PHP blockchain implementation.

Example usage:

//Create the chain
$chain = new \Blockchain\Chain();

//Add some blocks to te chain
$firstBlock = new \Blockchain\Block(0, null, time(), 'Example data 1');
$chain->addBlock($firstBlock);

$secondBlock = new \Blockchain\Block(1, $firstBlock->getHash(), time(), 'Example data 2');
$chain->addBlock($secondBlock);

//Check if valid
if($chain->isValid()){
    //The chain is valid
}