# blkdat-stream

> A streamline blk*.dat stream module, useful for parsing the Bitcoin blockchain

Latest version **1.0.2** (published 2015-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install blkdat-stream
pnpm add blkdat-stream
yarn add blkdat-stream
bun add blkdat-stream
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-03-25 |
| First published | 2015-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Daniel Cousens |
| Maintainers | dcousens |
| Keywords | blockchain, bitcoin, block, blkdat, dat, blk*.dat, chain, parser, streams, streaming, stream |

## Links

- npm: https://www.npmjs.com/package/blkdat-stream
- Repository: https://github.com/dcousens/blkdat-stream
- Issues: https://github.com/dcousens/blkdat-stream/issues
- npm.io page: https://npm.io/package/blkdat-stream

## Dependencies (1)

- [through](https://npm.io/package/through.md) ^2.3.6

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2015-03-25
- 1.0.1 — 2015-03-25
- 1.0.0 — 2015-03-25

## README

# blkdat-stream

[![Version](http://img.shields.io/npm/v/blkdat-stream.svg)](https://www.npmjs.org/package/blkdat-stream)

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

``` javascript
// 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](https://github.com/bitcoinjs/bitcoinjs-lib) or [bitcore](https://github.com/bitpay/bitcore).

---
_Source: https://npm.io/package/blkdat-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
