@cvbb/bc-ur
Advanced tools
Comparing version 0.2.7 to 0.2.8
@@ -15,3 +15,3 @@ "use strict"; | ||
var headerLength = Buffer.alloc(1); | ||
headerLength.writeUInt8(length); | ||
headerLength.writeUInt8(length, 0); | ||
header = Buffer.concat([Buffer.from([0x58]), headerLength]); | ||
@@ -21,3 +21,3 @@ } | ||
var headerLength = Buffer.alloc(2); | ||
headerLength.writeUInt16BE(length); | ||
headerLength.writeUInt16BE(length, 0); | ||
header = Buffer.concat([Buffer.from([0x59]), headerLength]); | ||
@@ -27,3 +27,3 @@ } | ||
var headerLength = Buffer.alloc(4); | ||
headerLength.writeUInt32BE(length); | ||
headerLength.writeUInt32BE(length, 0); | ||
header = Buffer.concat([Buffer.from([0x60]), headerLength]); | ||
@@ -30,0 +30,0 @@ } |
{ | ||
"name": "@cvbb/bc-ur", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "BlockChain Commons Uniform Resources", | ||
@@ -19,3 +19,3 @@ "author": "aaronisme <aarondongchen@gmail.com>", | ||
"dependencies": { | ||
"@cvbb/bc-bech32": "^1.1.7", | ||
"@cvbb/bc-bech32": "^1.1.8", | ||
"@types/sha.js": "^2.4.0", | ||
@@ -39,3 +39,3 @@ "sha.js": "^2.4.11" | ||
}, | ||
"gitHead": "25c702410b104aa56e58b054a318a46ff8d9d738" | ||
"gitHead": "750eba769712f418003c47022d9de6f0fd68bdc2" | ||
} |
@@ -11,11 +11,11 @@ /* | ||
const headerLength = Buffer.alloc(1); | ||
headerLength.writeUInt8(length); | ||
headerLength.writeUInt8(length, 0); | ||
header = Buffer.concat([Buffer.from([0x58]), headerLength]); | ||
} else if (length >= 256 && length <= 65535) { | ||
const headerLength = Buffer.alloc(2); | ||
headerLength.writeUInt16BE(length); | ||
headerLength.writeUInt16BE(length, 0); | ||
header = Buffer.concat([Buffer.from([0x59]), headerLength]); | ||
} else if (length >= 65536 && length <= 2 ** 32 - 1) { | ||
const headerLength = Buffer.alloc(4); | ||
headerLength.writeUInt32BE(length); | ||
headerLength.writeUInt32BE(length, 0); | ||
header = Buffer.concat([Buffer.from([0x60]), headerLength]); | ||
@@ -22,0 +22,0 @@ } else { |
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
29818
Updated@cvbb/bc-bech32@^1.1.8