@exodus/bitcoinjs-lib-dogecoin
Advanced tools
Comparing version 4.1.0 to 4.1.1
{ | ||
"name": "@exodus/bitcoinjs-lib-dogecoin", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Client-side Bitcoin JavaScript library", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -37,3 +37,3 @@ const Buffer = require('safe-buffer').Buffer | ||
const payload = Buffer.allocUnsafe(21) | ||
const payload = Buffer.alloc(21) | ||
payload.writeUInt8(version, 0) | ||
@@ -40,0 +40,0 @@ hash.copy(payload, 1) |
@@ -102,3 +102,3 @@ const Buffer = require('safe-buffer').Buffer | ||
Block.prototype.toBuffer = function (headersOnly) { | ||
const buffer = Buffer.allocUnsafe(this.byteLength(headersOnly)) | ||
const buffer = Buffer.alloc(this.byteLength(headersOnly)) | ||
@@ -105,0 +105,0 @@ let offset = 0 |
@@ -48,3 +48,3 @@ const lazy = require('./lazy') | ||
const payload = Buffer.allocUnsafe(21) | ||
const payload = Buffer.alloc(21) | ||
payload.writeUInt8(network.pubKeyHash, 0) | ||
@@ -51,0 +51,0 @@ o.hash.copy(payload, 1) |
@@ -76,3 +76,3 @@ const lazy = require('./lazy') | ||
const payload = Buffer.allocUnsafe(21) | ||
const payload = Buffer.alloc(21) | ||
payload.writeUInt8(network.scriptHash, 0) | ||
@@ -79,0 +79,0 @@ o.hash.copy(payload, 1) |
@@ -47,3 +47,3 @@ const Buffer = require('safe-buffer').Buffer | ||
const size = scriptNumSize(value) | ||
const buffer = Buffer.allocUnsafe(size) | ||
const buffer = Buffer.alloc(size) | ||
const negative = number < 0 | ||
@@ -50,0 +50,0 @@ |
@@ -49,3 +49,3 @@ const bip66 = require('bip66') | ||
const hashTypeBuffer = Buffer.allocUnsafe(1) | ||
const hashTypeBuffer = Buffer.alloc(1) | ||
hashTypeBuffer.writeUInt8(hashType, 0) | ||
@@ -52,0 +52,0 @@ |
@@ -56,3 +56,3 @@ const Buffer = require('safe-buffer').Buffer | ||
const buffer = Buffer.allocUnsafe(bufferSize) | ||
const buffer = Buffer.alloc(bufferSize) | ||
let offset = 0 | ||
@@ -168,3 +168,3 @@ | ||
if (Buffer.isBuffer(op)) return op | ||
if (op === OPS.OP_0) return Buffer.allocUnsafe(0) | ||
if (op === OPS.OP_0) return Buffer.alloc(0) | ||
@@ -171,0 +171,0 @@ return scriptNumber.encode(op - OP_INT_BASE) |
@@ -25,3 +25,3 @@ // OP_RETURN {aa21a9ed} {commitment} | ||
const buffer = Buffer.allocUnsafe(36) | ||
const buffer = Buffer.alloc(36) | ||
HEADER.copy(buffer, 0) | ||
@@ -28,0 +28,0 @@ commitment.copy(buffer, 4) |
@@ -39,3 +39,3 @@ const Buffer = require('safe-buffer').Buffer | ||
const EMPTY_SCRIPT = Buffer.allocUnsafe(0) | ||
const EMPTY_SCRIPT = Buffer.alloc(0) | ||
const EMPTY_WITNESS = [] | ||
@@ -327,3 +327,3 @@ const ZERO = Buffer.from('0000000000000000000000000000000000000000000000000000000000000000', 'hex') | ||
// serialize and hash | ||
const buffer = Buffer.allocUnsafe(txTmp.__byteLength(false) + 4) | ||
const buffer = Buffer.alloc(txTmp.__byteLength(false) + 4) | ||
buffer.writeInt32LE(hashType, buffer.length - 4) | ||
@@ -353,3 +353,3 @@ txTmp.__toBuffer(buffer, 0, false) | ||
if (!(hashType & Transaction.SIGHASH_ANYONECANPAY)) { | ||
tbuffer = Buffer.allocUnsafe(36 * this.ins.length) | ||
tbuffer = Buffer.alloc(36 * this.ins.length) | ||
toffset = 0 | ||
@@ -368,3 +368,3 @@ | ||
(hashType & 0x1f) !== Transaction.SIGHASH_NONE) { | ||
tbuffer = Buffer.allocUnsafe(4 * this.ins.length) | ||
tbuffer = Buffer.alloc(4 * this.ins.length) | ||
toffset = 0 | ||
@@ -385,3 +385,3 @@ | ||
tbuffer = Buffer.allocUnsafe(txOutsSize) | ||
tbuffer = Buffer.alloc(txOutsSize) | ||
toffset = 0 | ||
@@ -398,3 +398,3 @@ | ||
tbuffer = Buffer.allocUnsafe(8 + varSliceSize(output.script)) | ||
tbuffer = Buffer.alloc(8 + varSliceSize(output.script)) | ||
toffset = 0 | ||
@@ -407,3 +407,3 @@ writeUInt64(output.value) | ||
tbuffer = Buffer.allocUnsafe(156 + varSliceSize(prevOutScript)) | ||
tbuffer = Buffer.alloc(156 + varSliceSize(prevOutScript)) | ||
toffset = 0 | ||
@@ -440,3 +440,3 @@ | ||
Transaction.prototype.__toBuffer = function (buffer, initialOffset, __allowWitness) { | ||
if (!buffer) buffer = Buffer.allocUnsafe(this.__byteLength(__allowWitness)) | ||
if (!buffer) buffer = Buffer.alloc(this.__byteLength(__allowWitness)) | ||
@@ -443,0 +443,0 @@ let offset = initialOffset || 0 |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
127702
1