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.
Instance object of block of token chain.
config
: the file path to save the token information
Return the block instance.
Put token chain genesis block into database.
genesis
: json object of genesis blockcb
: callback function
Get blocks from array of blockhash
hashArray
: an array of block hashcb
: callback function
block
: json object of blockcb
: callback function
minHeight
: height of block begin to readmaxHeight
: height of block end to readcb
: callback function
Get genesis block direct from buffer
Get last block direct from buffer
Verification the transaction.
config
: Token Block chain
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
Return the block chain instance
Create the genesis blockchain
Funcionality simlar as token blockchain and token block
MIT