Stretches test for derive m/0 from xpub
This commit is contained in:
parent
a830e2cded
commit
02691098de
1 changed files with 6 additions and 3 deletions
|
@ -233,11 +233,14 @@ describe('HDWallet', function() {
|
|||
|
||||
describe('derive', 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.toBase58(), 'xpub6DyYbqDaPgHkj1Sk5EaqC4HgGN7xRePCGJeei9En2kCK8kZk8HRnnPuKSbNX6vwQVvmYnTPhK8vpUEXTBd5BQ9MUKBewhGJtL49YuUfQwJw')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue