bitcoinjs/blkdat-stream

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

Homepage:

Size: 13

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.