Name: blkdat-stream
Owner: BitcoinJS
Description: A blk*.dat streaming module, useful for parsing the Bitcoin blockchain
Created: 2015-03-25 00:44:16.0
Updated: 2018-04-05 14:17:28.0
Pushed: 2016-02-09 12:07:23.0
Size: 13
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A lite blk*.dat streaming module, useful for parsing the Bitcoin blockchain
Note: For a high performance C++ parser, see https://github.com/dcousens/fast-dat-parser
sage: cat blk*.dat | node this.js
BlockStream = require('blkdat-stream')
blockStream = new BlockStream() // for testnet3: new BlockStream(0x0709110b)
ess.stdin.pipe(new BlockStream()).on('data', function (blockBuffer) {
// ... now, parse the block data buffer (is an atomic block)
To parse the returned block data, use a library such as bitcoinjs-lib or bitcore.