integration: return sharedQ too

This commit is contained in:
Daniel Cousens 2015-08-25 13:45:35 +10:00
parent 79db118417
commit e9762b14c7

View file

@ -24,7 +24,7 @@ describe('bitcoinjs-lib (crypto)', function () {
var Qprime = Q.add(cG)
return {
address: new bitcoin.ECPair(null, Qprime).getAddress(),
sharedQ: Qprime,
nonceQ: noncePair.Q
}
}
@ -34,9 +34,7 @@ describe('bitcoinjs-lib (crypto)', function () {
var c = bigi.fromBuffer(bitcoin.crypto.sha256(dP.getEncoded()))
var derived = new bitcoin.ECPair(d.add(c).mod(n))
return {
keyPair: derived
}
return derived
}
// receiver private key
@ -48,7 +46,7 @@ describe('bitcoinjs-lib (crypto)', function () {
var stealthR = stealthReceive(receiver.d, stealthS.nonceQ) // private, done by receiver
// and check that we derived both sides correctly
assert.equal(stealthS.address, stealthR.keyPair.getAddress())
assert.equal(stealthS.sharedQ.getAddress(), stealthR.getAddress())
})
// TODO