Socket
Socket
Sign inDemoInstall

bitcore

Package Overview
Dependencies
Maintainers
2
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitcore - npm Package Compare versions

Comparing version 0.12.13 to 0.12.14

9

benchmark/script.js

@@ -35,2 +35,10 @@ 'use strict';

function isPublicKeyOut() {
if (c >= scripts.length) {
c = 0;
}
scripts[c].isPublicKeyOut();
c++;
}
function isPublicKeyHashIn() {

@@ -62,2 +70,3 @@ if (c >= scripts.length) {

suite.add('isPublicKeyHashIn', isPublicKeyHashIn, {maxTime: maxTime});
suite.add('isPublicKeyOut', isPublicKeyOut, {maxTime: maxTime});
suite.add('toAddress', toAddress, {maxTime: maxTime});

@@ -64,0 +73,0 @@ suite.add('getAddressInfo', getAddressInfo, {maxTime: maxTime});

2

bower.json
{
"name": "bitcore",
"main": "./bitcore.min.js",
"version": "0.12.13",
"version": "0.12.14",
"homepage": "http://bitcore.io",

@@ -6,0 +6,0 @@ "authors": [

@@ -279,6 +279,21 @@ 'use strict';

Script.prototype.isPublicKeyOut = function() {
return this.chunks.length === 2 &&
BufferUtil.isBuffer(this.chunks[0].buf) &&
PublicKey.isValid(this.chunks[0].buf) &&
this.chunks[1].opcodenum === Opcode.OP_CHECKSIG;
if (this.chunks.length === 2 &&
this.chunks[0].buf &&
this.chunks[0].buf.length &&
this.chunks[1].opcodenum === Opcode.OP_CHECKSIG) {
var pubkeyBuf = this.chunks[0].buf;
var version = pubkeyBuf[0];
var isVersion = false;
if ((version === 0x04 ||
version === 0x06 ||
version === 0x07) && pubkeyBuf.length === 65) {
isVersion = true;
} else if ((version === 0x03 || version === 0x02) && pubkeyBuf.length === 33) {
isVersion = true;
}
if (isVersion) {
return PublicKey.isValid(pubkeyBuf);
}
}
return false;
};

@@ -285,0 +300,0 @@

{
"name": "bitcore",
"version": "0.12.12",
"version": "0.12.13",
"dependencies": {

@@ -5,0 +5,0 @@ "bn.js": {

{
"name": "bitcore",
"version": "0.12.13",
"version": "0.12.14",
"description": "A pure and powerful JavaScript Bitcoin library.",

@@ -5,0 +5,0 @@ "author": "BitPay <dev@bitpay.com>",

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