All Projects → bitcoinjs → blkdat-stream

bitcoinjs / blkdat-stream

Licence: MIT license
A blk*.dat streaming module, useful for parsing the Bitcoin blockchain

Programming Languages

javascript
184084 projects - #8 most used programming language

blkdat-stream

Version

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

Example

// usage: cat blk*.dat | node this.js

var BlockStream = require('blkdat-stream')
var blockStream = new BlockStream() // for testnet3: new BlockStream(0x0709110b)

process.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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].