From 53f3ee3209548e55d1e188f4704aa7c6b43c40dd Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 4 Sep 2026 12:37:20 -0700 Subject: [PATCH] Extract identity public key for use in tests dedicated to its unique behavior. --- test/vectors.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/vectors.mjs b/test/vectors.mjs index 76c8c30..4666520 100644 --- a/test/vectors.mjs +++ b/test/vectors.mjs @@ -1,7 +1,14 @@ //! SPDX-FileCopyrightText: 2026 Chris Duncan //! SPDX-License-Identifier: GPL-3.0-or-later -// https://docs.nano.org/integration-guides/key-management/#success-response_2 +export const IDENTITY = { + publicKey: '0100000000000000000000000000000000000000000000000000000000000000', + publicKeyBytes: new Uint8Array([0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), +} + +/** + * https://docs.nano.org/integration-guides/key-management/#success-response_2 + */ export const NANO_ORG_VECTOR = { blockHash: 'BB569136FA05F8CBF65CEF2EDE368475B289C4477342976556BA4C0DDF216E45', blockHashBytes: new Uint8Array([0xBB, 0x56, 0x91, 0x36, 0xFA, 0x05, 0xF8, 0xCB, 0xF6, 0x5C, 0xEF, 0x2E, 0xDE, 0x36, 0x84, 0x75, 0xB2, 0x89, 0xC4, 0x47, 0x73, 0x42, 0x97, 0x65, 0x56, 0xBA, 0x4C, 0x0D, 0xDF, 0x21, 0x6E, 0x45]), @@ -24,7 +31,7 @@ export const NANO_ORG_VECTOR = { */ export const PROBLEM_VECTOR = { blockHash: '150AFD70BD1E9845715F91D7CD7D5EE2683668199F19B4DF533FC7802CE07CA2', - publicKey: '0100000000000000000000000000000000000000000000000000000000000000', + publicKey: IDENTITY.publicKey, signature: '1A8CFB63796525E47EBAF0B8696D95E2B893CBCC13454CB34530A59A3725C1A9FEA02A1F072BADE964BE5378CFA5AD50E743F167987444B1C9E3D7B3E6009F07', } -- 2.52.0