Block class
author |
Rene Korss rene.korss@gmail.com |
---|---|
package |
Default |
__construct(\RKD\Blockchain\Block $previousBlock, string $data) : void
string
Data to store in block
compare(mixed $compare) : boolean
mixed
Comparable object
boolean
generateHash() : string
string
Generated hash
genesis(string $data = 'Genesis block') : self
string
Data to store in block
self
getData() : string
string
Block data
getHash() : string
string
Block hash
getIndex() : integer
integer
Block index
getPreviousHash() : string
string
Previous block hash
isValid() : boolean
boolean
True if block is valid, false otherwise
toArray() : array
array
index : integer
var |
---|
integer
hash : string
var |
---|
string
previousHash : string
var |
---|
string
createdDatetime : \DateTimeImmutable
var |
---|
\DateTimeImmutable
data : string
var |
---|
string