Comparing version 0.0.16 to 0.0.17
@@ -0,0 +0,0 @@ var types = require("./types") |
@@ -0,0 +0,0 @@ var ByteBuffer = require('bytebuffer'); |
@@ -0,0 +0,0 @@ var ecdsa = require('./signature/ecdsa'); |
@@ -0,0 +0,0 @@ var assert = require('assert') // from github.com/bitcoinjs/bitcoinjs-lib from github.com/cryptocoinjs/ecdsa |
@@ -0,0 +0,0 @@ var assert = require('assert'); // from https://github.com/bitcoinjs/bitcoinjs-lib |
@@ -0,0 +0,0 @@ module.exports = function enforce(type, value) { // Copied from https://github.com/bitcoinjs/bitcoinjs-lib |
@@ -0,0 +0,0 @@ var crypto = require('crypto'); |
@@ -0,0 +0,0 @@ var ChainTypes; |
@@ -0,0 +0,0 @@ var PublicKey = require("./key-public") |
@@ -0,0 +0,0 @@ // Low-level types that make up operations |
@@ -0,0 +0,0 @@ var ecurve = require('ecurve'); |
@@ -0,0 +0,0 @@ var BigInteger = require('bigi'); |
@@ -58,11 +58,13 @@ var bigi = require('bigi'), | ||
var isWif = false; | ||
var bufWif = new Buffer(bs58.decode(privWif)); | ||
var privKey = bufWif.slice(0, -4); | ||
var checksum = bufWif.slice(-4); | ||
var newChecksum = crypto.createHash('sha256').update(privKey).digest(); | ||
newChecksum = crypto.createHash('sha256').update(newChecksum).digest(); | ||
newChecksum = newChecksum.slice(0, 4); | ||
if (checksum.toString() == newChecksum.toString()) { | ||
isWif = true; | ||
} | ||
try { | ||
var bufWif = new Buffer(bs58.decode(privWif)); | ||
var privKey = bufWif.slice(0, -4); | ||
var checksum = bufWif.slice(-4); | ||
var newChecksum = crypto.createHash('sha256').update(privKey).digest(); | ||
newChecksum = crypto.createHash('sha256').update(newChecksum).digest(); | ||
newChecksum = newChecksum.slice(0, 4); | ||
if (checksum.toString() == newChecksum.toString()) { | ||
isWif = true; | ||
} | ||
} catch (e) { } | ||
return isWif; | ||
@@ -95,7 +97,7 @@ }; | ||
var signatures = []; | ||
if (trx.signatures) { | ||
if (trx.signatures) { | ||
signatures = [].concat(trx.signatures); | ||
} | ||
var cid = new Buffer('0000000000000000000000000000000000000000000000000000000000000000', 'hex'); | ||
var cid = new Buffer('0000000000000000000000000000000000000000000000000000000000000000', 'hex'); | ||
var buf = transaction.toBuffer(trx); | ||
@@ -102,0 +104,0 @@ |
{ | ||
"name": "steemauth", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ var steemAuth = require('./lib/steemauth'), |
Sorry, the diff of this file is not supported yet
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
92590
20
2558
17
1