bcb-stream-parser
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "bcb-stream-parser", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Parse BitCoin-Block via NodeJS.ReadableStream", | ||
@@ -29,3 +29,4 @@ "main": "index.cjs", | ||
"dependencies": { | ||
"async-readable": "^0.1.4", | ||
"async-readable": "^0.1.5", | ||
"bn.js": "^5.0.0", | ||
"buffer-pond": "^0.6.0", | ||
@@ -36,2 +37,3 @@ "proxy-bind": "^1.1.0", | ||
"devDependencies": { | ||
"@types/bn.js": "^4.11.5", | ||
"@types/jest": "^24.0.15", | ||
@@ -38,0 +40,0 @@ "@types/node": "^12.6.8", |
@@ -5,2 +5,5 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
const BN = _interopDefault(require('bn.js')); | ||
const proxyBind = require('proxy-bind'); | ||
@@ -60,3 +63,3 @@ const bufferPond = require('buffer-pond'); | ||
case 0xFE: return (await read(4)).readUInt32LE(0); | ||
case 0xFF: return Number((await read(8)).readBigUInt64LE(0)); | ||
case 0xFF: return new BN(await read(8), 'le').toNumber(); | ||
default: return size; | ||
@@ -95,3 +98,3 @@ } | ||
return async function () { | ||
const value = '0x' + (await read(8)).readBigUInt64LE().toString(16); | ||
const value = '0x' + new BN(await read(8), 'le').toString(16); | ||
const script = await verStrThunk(); | ||
@@ -98,0 +101,0 @@ return { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42534
1277
5
11
+ Addedbn.js@^5.0.0
+ Addedbn.js@5.2.1(transitive)
Updatedasync-readable@^0.1.5