|
|
@ -1,9 +1,8 @@ |
|
|
|
var Point = require('./browser/Point'), |
|
|
|
var Point = require('./Point'), |
|
|
|
Key = require('./Key'), |
|
|
|
buffertools = require('buffertools'), |
|
|
|
sha256 = require('../util').sha256, |
|
|
|
twoSha256 = require('../util').twoSha256, |
|
|
|
BigInteger = require('../browser/vendor-bundle.js').BigInteger; |
|
|
|
twoSha256 = require('../util').twoSha256; |
|
|
|
|
|
|
|
// TODO: use native modules instead of browser libraries
|
|
|
|
|
|
|
@ -26,10 +25,8 @@ Armory.prototype.generatePubKey = function () { |
|
|
|
for (var i = 0; i < 32; i++) |
|
|
|
chainXor[i] ^= chainCode[i]; |
|
|
|
|
|
|
|
var A = new BigInteger(chainXor.toString('hex'), 16); |
|
|
|
|
|
|
|
var pt = Point.fromUncompressedPubKey(pubKey); |
|
|
|
pt = Point.multiply(pt, A); |
|
|
|
pt = Point.multiply(pt, chainXor); |
|
|
|
|
|
|
|
var new_pubkey = pt.toUncompressedPubKey(); |
|
|
|
|
|
|
|