|
@ -49,6 +49,7 @@ describe('Signature', function() { |
|
|
var sig = Signature.fromCompact(compressed); |
|
|
var sig = Signature.fromCompact(compressed); |
|
|
sig.r.cmp(BN.Zero).should.equal(0); |
|
|
sig.r.cmp(BN.Zero).should.equal(0); |
|
|
sig.s.cmp(BN.Zero).should.equal(0); |
|
|
sig.s.cmp(BN.Zero).should.equal(0); |
|
|
|
|
|
sig.compressed.should.equal(true); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
it('should create a signature from an uncompressed signature', function() { |
|
|
it('should create a signature from an uncompressed signature', function() { |
|
@ -59,6 +60,7 @@ describe('Signature', function() { |
|
|
var s = '2fc1188e8b0dc553a2588be2b5b68dbbd7f092894aa3397786e9c769c5348dc6'; |
|
|
var s = '2fc1188e8b0dc553a2588be2b5b68dbbd7f092894aa3397786e9c769c5348dc6'; |
|
|
sig.r.toString('hex').should.equal(r); |
|
|
sig.r.toString('hex').should.equal(r); |
|
|
sig.s.toString('hex').should.equal(s); |
|
|
sig.s.toString('hex').should.equal(s); |
|
|
|
|
|
sig.compressed.should.equal(false); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|