From a8f42472c92d6dfc1ac97259faf83bf7980738d4 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sun, 26 Apr 2026 13:15:10 -0700 Subject: [PATCH] Test block signing with Exodus wallet. --- test/test.blocks.mjs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/test.blocks.mjs b/test/test.blocks.mjs index 385e220..f392d2f 100644 --- a/test/test.blocks.mjs +++ b/test/test.blocks.mjs @@ -100,7 +100,7 @@ await Promise.all([ suite('Block signing using official test vectors', async () => { const { ADDRESS_0, BIP39_SEED, BLAKE2B_ADDRESS_1, BLAKE2B_PUBLIC_1, BLAKE2B_SEED, OPEN_BLOCK, PASSWORD, PUBLIC_0, PRIVATE_0, RECEIVE_BLOCK, SEND_BLOCK } = NANO_TEST_VECTORS - const { LEDGER_NANOS } = CUSTOM_TEST_VECTORS + const { EXODUS, LEDGER_NANOS } = CUSTOM_TEST_VECTORS await test('sign open block with BLAKE2b wallet', async () => { const wallet = await Wallet.load('BLAKE2b', PASSWORD, BLAKE2B_SEED) @@ -126,6 +126,18 @@ await Promise.all([ await wallet.destroy() }) + await test('sign open block with Exodus wallet', async () => { + const wallet = await Wallet.load('Exodus', PASSWORD, EXODUS.BIP39_SEED_0) + await assert.resolves(wallet.unlock(PASSWORD)) + + const block = new Block(EXODUS.ADDRESS_0, '0', OPEN_BLOCK.previous, OPEN_BLOCK.representative) + .receive(OPEN_BLOCK.link, OPEN_BLOCK.balance) + await wallet.sign(0, block) + assert.ok(await block.verify(EXODUS.PUBLIC_0)) + + await wallet.destroy() + }) + await test('fail to sign open block with wallet when locked', async () => { const wallet = await Wallet.load('BIP-44', PASSWORD, BIP39_SEED) const block = new Block(ADDRESS_0, '0', OPEN_BLOCK.previous, OPEN_BLOCK.representative) -- 2.47.3