HDNode: use typeforce.tuple for arguments
This commit is contained in:
parent
eb752f8316
commit
5d2abb523e
2 changed files with 6 additions and 16 deletions
test
|
@ -52,16 +52,8 @@ describe('HDNode', function () {
|
|||
|
||||
it('throws when an invalid length chain code is given', function () {
|
||||
assert.throws(function () {
|
||||
new HDNode(keyPair, chainCode.slice(0, 20))
|
||||
}, /Expected chainCode length of 32, got 20/)
|
||||
})
|
||||
|
||||
it('throws when an unknown network is given', function () {
|
||||
keyPair.network = {}
|
||||
|
||||
assert.throws(function () {
|
||||
new HDNode(keyPair, chainCode)
|
||||
}, /Unknown BIP32 constants for network/)
|
||||
new HDNode(keyPair, new Buffer(20))
|
||||
}, /Expected 256-bit Buffer, got 160-bit/)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue