Skip to content

bitcoinjs/blkdat-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A blk*.dat streaming module, useful for parsing the Bitcoin blockchain

Resources

License

Stars

Watchers

Forks

Packages

No packages published