Blockchain

Implements \Countable, \JsonSerializable, \IteratorAggregate

Main blockchain class

author

Rene Korss rene.korss@gmail.com

package

Default

Methods

Constructor

__construct() : void

Add genesis block

Add block to blockchain

add(\RKD\Blockchain\Block $block) : self

Arguments

$block

\RKD\Blockchain\Block

Block to add to chain

Response

self

Detect if blockchain is valid

isValid() 

Get last block in chain

last() 

Properties

Holds blocks

blocks : array
var

Type(s)

array