From: Chris Duncan Date: Sat, 31 Aug 2024 20:25:32 +0000 (-0700) Subject: Test legacy account derivation. Test hardened indices. Increase derivation count... X-Git-Tag: v0.0.1~4 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=77b9554fb2a8a8eb3dd9dde5d5c04d51460577e8;p=libnemo.git Test legacy account derivation. Test hardened indices. Increase derivation count to stress test. --- diff --git a/test/test.mjs b/test/test.mjs index 19886f8..4ec829d 100644 --- a/test/test.mjs +++ b/test/test.mjs @@ -157,8 +157,28 @@ describe('derive more accounts from the same seed test', function () { const result2 = wallet.accounts( '0dc285fde768f7ff29b66ce7252d56ed92fe003b605907f7a4f683c3dc8586d34a914d3c71fc099bb38ee4a59e5b081a3497b7a323e90cc68f67b5837690310c', - 1000000, 1000099) - expect(result2.length).to.equal(100) + 0x80000000, 0x800000ff) + expect(result2.length).to.equal(0x100) + }) + +}) + +describe('derive more accounts from the same seed test', function () { + this.slow(0) + + it('should derive accounts from the given seed', () => { + const result = wallet.legacyAccounts( + 'BE3E51EE51BAB11950B2495013512FEB110D9898B4137DA268709621CE2862F4', + 0x0, 0xff) + expect(result.length).to.equal(0x100) + expect(result[0].privateKey).to.exist + expect(result[0].publicKey).to.exist + expect(result[0].address).to.exist + + const result2 = wallet.legacyAccounts( + 'BE3E51EE51BAB11950B2495013512FEB110D9898B4137DA268709621CE2862F4', + 0x80000000, 0x800000ff) + expect(result2.length).to.equal(0x100) }) })