]> zoso.dev Git - libnemo.git/commitdiff
Add block creation test vectors retrieved from Nano documentation.
authorChris Duncan <chris@zoso.dev>
Mon, 25 Nov 2024 16:46:12 +0000 (08:46 -0800)
committerChris Duncan <chris@zoso.dev>
Mon, 25 Nov 2024 16:46:12 +0000 (08:46 -0800)
test/TEST_VECTORS.js

index 15465726671c3761e7883c41e3e69e569cced19c..a84f46250b82cdd69f3d841e94050bec6a4443ef 100644 (file)
@@ -7,7 +7,8 @@
 * Do not send any funds to the test vectors below!
 *
 * Sources:
-*      https://docs.nano.org/integration-guides/key-management/
+*      https://docs.nano.org/integration-guides/key-management/#test-vectors
+*      https://docs.nano.org/integration-guides/key-management/#creating-transactions
 *      https://github.com/trezor/python-mnemonic/blob/master/vectors.json
 *      https://tools.nanos.cc/?tool=seed
 */
@@ -30,7 +31,38 @@ export const NANO_TEST_VECTORS = Object.freeze({
 
        PRIVATE_2: '1257DF74609B9C6461A3F4E7FD6E3278F2DDCF2562694F2C3AA0515AF4F09E38',
        PUBLIC_2: 'A46DA51986E25A14D82E32D765DCEE69B9EECCD4405411430D91DDB61B717566',
-       ADDRESS_2: 'nano_3b5fnnerfrkt4me4wepqeqggwtfsxu8fai4n473iu6gxprfq4xd8pk9gh1dg'
+       ADDRESS_2: 'nano_3b5fnnerfrkt4me4wepqeqggwtfsxu8fai4n473iu6gxprfq4xd8pk9gh1dg',
+
+       SEND_BLOCK: {
+               account: "nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx",
+               previous: "92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D",
+               representative: "nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou",
+               balance: "11618869000000000000000000000000",
+               link: "CBC911F57B6827649423C92C88C0C56637A4274FF019E77E24D61D12B5338783",
+               key: "781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3",
+               signature: "79240D56231EF1885F354473733AF158DC6DA50E53836179565A20C0BE89D473ED3FF8CD11545FF0ED162A0B2C4626FD6BF84518568F8BB965A4884C7C32C205",
+               work: "fbffed7c73b61367"
+       },
+       RECEIVE_BLOCK: {
+               account: "nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx",
+               previous: "92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D",
+               representative: "nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou",
+               balance: "11618869000000000000000000000000",
+               link: "CBC911F57B6827649423C92C88C0C56637A4274FF019E77E24D61D12B5338783",
+               key: "781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3",
+               signature: "EEFFE1EFCCC8F2F6F2F1B79B80ABE855939DD9D6341323186494ADEE775DAADB3B6A6A07A85511F2185F6E739C4A54F1454436E22255A542ED879FD04FEED001",
+               work: "c5cf86de24b24419"
+       },
+       OPEN_BLOCK: {
+               account: "nano_1rawdji18mmcu9psd6h87qath4ta7iqfy8i4rqi89sfdwtbcxn57jm9k3q11",
+               previous: "0000000000000000000000000000000000000000000000000000000000000000",
+               representative: "nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou",
+               balance: "100",
+               link: "5B2DA492506339C0459867AA1DA1E7EDAAC4344342FAB0848F43B46D248C8E99",
+               key: "0ED82E6990A16E7AD2375AB5D54BEAABF6C676D09BEC74D9295FCAE35439F694",
+               signature: "903991714A55954D15C91DB75CAE2FBF1DD1A2D6DA5524AA2870F76B50A8FE8B4E3FBB53E46B9E82638104AAB3CFA71CFC36B7D676B3D6CAE84725D04E4C360F",
+               work: "08d09dc3405d9441"
+       }
 })
 
 export const TREZOR_TEST_VECTORS = Object.freeze({