sec blockchain block lib
npm install @sec-block/secjs-blockThis 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.
#### new secjsTokenBlock()
Instance object of block of token chain.
- config: the file path to save the token information
#### secjsTokenBlock.generateBlock(tokenPool, tokenBlockChain)
Get the block information from transaction pool and write the information to block object.
- tokenPool: Instance of token transaction pool
- tokenBlockChain: Instance of token-blockchain
#### secjsTokenBlock.getBlock()
Return the block instance.
genesis: json object of genesis blockcb: callback functionhash: the hash of a blockcb: callback functionhashArray: an array of block hashcb: callback functionblock: json object of blockcb: callback function#### secjsTokenBlock.verifyTransaction()
Verification the transaction.
config: Token Block chaincallback: callback function with parameter tocken blockchain#### License
MIT