|
@ -233,11 +233,14 @@ describe('HDWallet', function() { |
|
|
|
|
|
|
|
|
describe('derive', function() { |
|
|
describe('derive', function() { |
|
|
describe('m/0', function() { |
|
|
describe('m/0', function() { |
|
|
it('works', function() { |
|
|
var wallet = HDWallet.fromBase58('xpub6CxuB8ifZCMXeS3KbyNkYvrsJEHqxedCSiUhrNwH1nKtb8hcJpxDbDxkdoVCTR2bQ1G8hY4UMv85gef9SEpgFFUftBjt37FUSZxVx4AU9Qh').derive(0) |
|
|
var wallet = HDWallet.fromBase58('xpub6CxuB8ifZCMXeS3KbyNkYvrsJEHqxedCSiUhrNwH1nKtb8hcJpxDbDxkdoVCTR2bQ1G8hY4UMv85gef9SEpgFFUftBjt37FUSZxVx4AU9Qh').derive(0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it('derives the correct public key', function() { |
|
|
|
|
|
assert.equal(wallet.pub.toHex(), '03146846eeb5a7533abb594ba734bc243fc7b6349499b8311c8fc13b0112ba8a77') |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('derives the correct depth', function() { |
|
|
assert.equal(wallet.depth, 4) |
|
|
assert.equal(wallet.depth, 4) |
|
|
assert.equal(wallet.toBase58(), 'xpub6DyYbqDaPgHkj1Sk5EaqC4HgGN7xRePCGJeei9En2kCK8kZk8HRnnPuKSbNX6vwQVvmYnTPhK8vpUEXTBd5BQ9MUKBewhGJtL49YuUfQwJw') |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|