SECJS-Blockchain

This libary contains the definition of block and block chain model. Use this libary can get the information of the block and blockchain information.
And also generate the genesis block.
$3
####
new secjsTokenBlock()
Instance object of block of token chain.
-
config: the file path to save the token information
####
secjsTokenBlock.getBlock()
Return the block instance.
$3
Put token chain genesis block into database.
-
genesis: json object of genesis block
-
cb: callback function
$3
Get blocks from array of blockhash
-
hashArray: an array of block hash
-
cb: callback function
$3
-
block: json object of block
-
cb: callback function
$3
-
minHeight: height of block begin to read
-
maxHeight: height of block end to read
-
cb: callback function
$3
Get genesis block direct from buffer
$3
Get last block direct from buffer
####
secjsTokenBlock.verifyTransaction()
Verification the transaction.
$3
-
config: Token Block chain
$3
This function check the existence of the file to save the block chain information. If the file is not existed, a new file will be created.
Otherwise the block chain will be loaded from the file.
-
callback: callback function with parameter tocken blockchain
$3
Return the block chain instance
$3
Create the genesis blockchain
$3
Funcionality simlar as token blockchain and token block
#### License
MIT