@sec-block/secjs-blockchain
sec blockchain block lib
Last updated a year ago by zuweihan1992 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @sec-block/secjs-blockchain 
SYNC missed versions from official npm registry.

SECJS-Blockchain

js-standard-style

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.

API of token blockchain

new secjsTokenBlock()

Instance object of block of token chain.

  • config: the file path to save the token information

secjsTokenBlock.getBlock()

Return the block instance.

secjsTokenBlock.putGenesis(genesis, cb)

Put token chain genesis block into database.

  • genesis: json object of genesis block
  • cb: callback function

secjsTokenBlock.getBlocksWithHashFromDB(hashArray, cb)

Get blocks from array of blockhash

  • hashArray: an array of block hash
  • cb: callback function

secjsTokenBlock.putBlockToDB(block, cb)

  • block: json object of block
  • cb: callback function

secjsTokenBlock.getBlockChainFromDB(minHeight, maxHeight, cb)

  • minHeight: height of block begin to read
  • maxHeight: height of block end to read
  • cb: callback function

secjsTokenBlock.getGenesis()

Get genesis block direct from buffer

secjsTokenBlock.getLastBlock()

Get last block direct from buffer

secjsTokenBlock.verifyTransaction()

Verification the transaction.

new secjsTokenBlockChain()

  • config: Token Block chain

secjsTokenBlockChain.init(callback)

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

secjsTokenBlockChain.getBlockChain()

Return the block chain instance

secjsTokenBlockChain.generateGenesisBlockChain()

Create the genesis blockchain

API of transaction block chain

Funcionality simlar as token blockchain and token block

License

MIT

Current Tags

  • 1.0.165                                ...           latest (a year ago)

131 Versions

  • 1.0.165                                ...           a year ago
  • 1.0.164                                ...           a year ago
  • 1.0.163                                ...           a year ago
  • 1.0.162                                ...           a year ago
  • 1.0.161                                ...           a year ago
  • 1.0.160                                ...           a year ago
  • 1.0.159                                ...           a year ago
  • 1.0.158                                ...           a year ago
  • 1.0.157                                ...           a year ago
  • 1.0.156                                ...           a year ago
  • 1.0.155                                ...           a year ago
  • 1.0.154                                ...           a year ago
  • 1.0.153                                ...           a year ago
  • 1.0.152                                ...           a year ago
  • 1.0.151                                ...           a year ago
  • 1.0.150                                ...           a year ago
  • 1.0.149                                ...           a year ago
  • 1.0.148                                ...           a year ago
  • 1.0.147                                ...           a year ago
  • 1.0.146                                ...           a year ago
  • 1.0.145                                ...           a year ago
  • 1.0.144                                ...           a year ago
  • 1.0.143                                ...           a year ago
  • 1.0.142                                ...           a year ago
  • 1.0.141                                ...           a year ago
  • 1.0.140                                ...           a year ago
  • 1.0.139                                ...           a year ago
  • 1.0.138                                ...           a year ago
  • 1.0.137                                ...           a year ago
  • 1.0.136                                ...           a year ago
  • 1.0.135                                ...           a year ago
  • 1.0.134                                ...           2 years ago
  • 1.0.133                                ...           2 years ago
  • 1.0.132                                ...           2 years ago
  • 1.0.131                                ...           2 years ago
  • 1.0.130                                ...           2 years ago
  • 1.0.129                                ...           2 years ago
  • 1.0.128                                ...           2 years ago
  • 1.0.127                                ...           2 years ago
  • 1.0.126                                ...           2 years ago
  • 1.0.125                                ...           2 years ago
  • 1.0.124                                ...           2 years ago
  • 1.0.123                                ...           2 years ago
  • 1.0.122                                ...           2 years ago
  • 1.0.121                                ...           2 years ago
  • 1.0.120                                ...           2 years ago
  • 1.0.119                                ...           2 years ago
  • 1.0.118                                ...           2 years ago
  • 1.0.117                                ...           2 years ago
  • 1.0.116                                ...           2 years ago
  • 1.0.115                                ...           2 years ago
  • 1.0.114                                ...           2 years ago
  • 1.0.113                                ...           2 years ago
  • 1.0.112                                ...           2 years ago
  • 1.0.111                                ...           2 years ago
  • 1.0.110                                ...           2 years ago
  • 1.0.109                                ...           2 years ago
  • 1.0.108                                ...           2 years ago
  • 1.0.107                                ...           2 years ago
  • 1.0.106                                ...           2 years ago
  • 1.0.105                                ...           2 years ago
  • 1.0.104                                ...           2 years ago
  • 1.0.103                                ...           2 years ago
  • 1.0.102                                ...           2 years ago
  • 1.0.101                                ...           2 years ago
  • 1.0.100                                ...           2 years ago
  • 1.0.99                                ...           2 years ago
  • 1.0.98                                ...           2 years ago
  • 1.0.97                                ...           2 years ago
  • 1.0.96                                ...           2 years ago
  • 1.0.95                                ...           2 years ago
  • 1.0.94                                ...           2 years ago
  • 1.0.93                                ...           2 years ago
  • 1.0.92                                ...           2 years ago
  • 1.0.91                                ...           2 years ago
  • 1.0.90                                ...           2 years ago
  • 1.0.89                                ...           2 years ago
  • 1.0.88                                ...           2 years ago
  • 1.0.87                                ...           2 years ago
  • 1.0.86                                ...           2 years ago
  • 1.0.85                                ...           2 years ago
  • 1.0.84                                ...           2 years ago
  • 1.0.83                                ...           2 years ago
  • 1.0.82                                ...           2 years ago
  • 1.0.81                                ...           2 years ago
  • 1.0.80                                ...           2 years ago
  • 1.0.79                                ...           2 years ago
  • 1.0.78                                ...           2 years ago
  • 1.0.77                                ...           2 years ago
  • 1.0.76                                ...           2 years ago
  • 1.0.75                                ...           2 years ago
  • 1.0.74                                ...           2 years ago
  • 1.0.73                                ...           2 years ago
  • 1.0.72                                ...           2 years ago
  • 1.0.71                                ...           2 years ago
  • 1.0.70                                ...           2 years ago
  • 1.0.69                                ...           2 years ago
  • 1.0.68                                ...           2 years ago
  • 1.0.67                                ...           2 years ago
  • 1.0.66                                ...           2 years ago
  • 1.0.65                                ...           2 years ago
  • 1.0.64                                ...           2 years ago
  • 1.0.63                                ...           2 years ago
  • 1.0.62                                ...           2 years ago
  • 1.0.61                                ...           2 years ago
  • 1.0.60                                ...           2 years ago
  • 1.0.59                                ...           2 years ago
  • 1.0.58                                ...           2 years ago
  • 1.0.57                                ...           2 years ago
  • 1.0.56                                ...           2 years ago
  • 1.0.55                                ...           2 years ago
  • 1.0.54                                ...           2 years ago
  • 1.0.53                                ...           2 years ago
  • 1.0.52                                ...           2 years ago
  • 1.0.51                                ...           2 years ago
  • 1.0.50                                ...           2 years ago
  • 1.0.49                                ...           2 years ago
  • 1.0.48                                ...           2 years ago
  • 1.0.47                                ...           2 years ago
  • 1.0.46                                ...           2 years ago
  • 1.0.43                                ...           2 years ago
  • 1.0.42                                ...           2 years ago
  • 1.0.41                                ...           2 years ago
  • 1.0.40                                ...           2 years ago
  • 1.0.39                                ...           2 years ago
  • 1.0.38                                ...           2 years ago
  • 1.0.37                                ...           2 years ago
  • 1.0.36                                ...           2 years ago
  • 1.0.35                                ...           2 years ago
  • 1.0.34                                ...           2 years ago
  • 1.0.33                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |