integration: return sharedQ too
This commit is contained in:
parent
79db118417
commit
e9762b14c7
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue