Browse Source

all chains passing for private extended keys

master
JP Richardson 11 years ago
parent
commit
f9616164c7
  1. 2
      lib/hdkey.js
  2. 4
      test/hdkey.test.js

2
lib/hdkey.js

@ -130,7 +130,7 @@ HDKey.prototype.deriveChild = function(index) {
// data = serP(point(kpar)) || ser32(index)
// = serP(Kpar) || ser32(index)
data = Buffer.concat([
new Buffer(this.publicPoint.getEncoded(true)),
new Buffer(this.pub.getEncoded(true)),
indexBuffer
])
}

4
test/hdkey.test.js

@ -12,7 +12,7 @@ function encode(buf) {
}
describe('hdkey', function() {
var f = fixtures.valid[0]//.forEach(function(f) {
var f = fixtures.valid.forEach(function(f) {
it('should properly derive the chain path: ' + f.path, function() {
var hdkey = new HDKey(new Buffer(f.seed, 'hex'))
@ -21,5 +21,5 @@ describe('hdkey', function() {
EQ (encode(childkey.private), f.private)
//EQ (encode(childkey.public), f.public)
})
//})
})
})
Loading…
Cancel
Save