diff --git a/lib/hdkey.js b/lib/hdkey.js index 581a789..f48492c 100644 --- a/lib/hdkey.js +++ b/lib/hdkey.js @@ -6,8 +6,6 @@ var ecurve = require('ecurve') var curve = ecurve.getCurveByName('secp256k1') var Point = ecurve.Point -module.exports = HDKey - var MASTER_SECRET = new Buffer('Bitcoin seed') var HARDENED_OFFSET = 0x80000000 var LEN = 78 @@ -229,3 +227,6 @@ function hash160 (buf) { var sha = crypto.createHash('sha256').update(buf).digest() return crypto.createHash('rmd160').update(sha).digest() } + +HDKey.HARDENED_OFFSET = HARDENED_OFFSET +module.exports = HDKey diff --git a/test/hdkey.test.js b/test/hdkey.test.js index f3fbc5b..96ce627 100644 --- a/test/hdkey.test.js +++ b/test/hdkey.test.js @@ -133,4 +133,10 @@ describe('hdkey', function () { assert.equal(newKey.privateExtendedKey, expected) }) }) + + describe('HARDENED_OFFSET', function () { + it('should be set', function () { + assert(HDKey.HARDENED_OFFSET) + }) + }) })