]> git.codecow.com Git - nano25519.git/commitdiff
Extract identity public key for use in tests dedicated to its unique behavior.
authorChris Duncan <chris@codecow.com>
Fri, 4 Sep 2026 19:37:20 +0000 (12:37 -0700)
committerChris Duncan <chris@codecow.com>
Fri, 4 Sep 2026 19:37:20 +0000 (12:37 -0700)
test/vectors.mjs

index 76c8c3046ccc49894dc380ecc4cd2f107879488a..4666520d248587e5e8129a52faa6126fa5db804e 100644 (file)
@@ -1,7 +1,14 @@
 //! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
 //! 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',
 }