diff --git a/src/base58.js b/src/base58.js index 47e8020..1264196 100644 --- a/src/base58.js +++ b/src/base58.js @@ -1,11 +1,9 @@ - // https://en.bitcoin.it/wiki/Base58Check_encoding var BigInteger = require('./jsbn/jsbn'); var Crypto = require('crypto-js'); -var SHA256 = Crypto.SHA256; -var WordArray = Crypto.lib.WordArray; var convert = require('./convert'); +var SHA256 = Crypto.SHA256; var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; var base = BigInteger.valueOf(58); diff --git a/src/ecdsa.js b/src/ecdsa.js index c35eac4..668555a 100644 --- a/src/ecdsa.js +++ b/src/ecdsa.js @@ -248,7 +248,7 @@ var ECDSA = { var alpha = x.multiply(x).multiply(x).add(a.multiply(x)).add(b).mod(p); var beta = alpha.modPow(P_OVER_FOUR, p); - var xorOdd = beta.isEven() ? (i % 2) : ((i+1) % 2); +// var xorOdd = beta.isEven() ? (i % 2) : ((i+1) % 2); // If beta is even, but y isn't or vice versa, then convert it, // otherwise we're done and y == beta. var y = (beta.isEven() ? !isYEven : isYEven) ? beta : p.subtract(beta); diff --git a/src/transaction.js b/src/transaction.js index 6a4978c..176fb74 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -5,7 +5,6 @@ var convert = require('./convert'); var ECKey = require('./eckey').ECKey; var ECDSA = require('./ecdsa'); var Address = require('./address'); -var Message = require('./message'); var SHA256 = require('crypto-js/sha256'); var Transaction = function (doc) { @@ -139,7 +138,7 @@ Transaction.prototype.serializeHex = function() { return convert.bytesToHex(this.serialize()); } -var OP_CODESEPARATOR = 171; +//var OP_CODESEPARATOR = 171; var SIGHASH_ALL = 1; var SIGHASH_NONE = 2; @@ -344,7 +343,7 @@ Transaction.prototype.p2shsign = function(index, script, key, type) { Transaction.prototype.multisign = Transaction.prototype.p2shsign; -Transaction.prototype.applyMultisigs = function(index, script, sigs, type) { +Transaction.prototype.applyMultisigs = function(index, script, sigs/*, type*/) { this.ins[index].script = Script.createMultiSigInputScript(sigs, script); }