Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bcb-stream-parser

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bcb-stream-parser - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

package.json
{
"name": "bcb-stream-parser",
"version": "0.2.2",
"version": "0.2.3",
"description": "Parse BitCoin-Block via NodeJS.ReadableStream",

@@ -5,0 +5,0 @@ "main": "index.cjs",

@@ -81,3 +81,3 @@ /// <reference types="node" />

} | undefined;
export declare function readHeader(read: Read): () => Promise<{
export declare function readHeader(read: Read): (readTxCount?: boolean) => Promise<{
type: "HEADER";

@@ -84,0 +84,0 @@ version: number;

@@ -233,5 +233,6 @@ 'use strict';

const compactSizeThunk = readCompactSize(read);
return async function () {
return async function (readTxCount = true) {
const chunk = await read(80);
const { readUInt32LE, slice } = proxyBind.bond(chunk);
const hash = blockHash(chunk);
const p = pointer(0);

@@ -248,4 +249,4 @@ const bytesHex = ramda.compose(toHex, reverseBuffer, ramda.apply(slice), p);

nonce: uint32LE(),
hash: blockHash(chunk),
txCount: await compactSizeThunk(),
hash,
txCount: readTxCount ? await compactSizeThunk() : 0,
};

@@ -252,0 +253,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc