diff --git a/app/Makefile.version b/app/Makefile.version index e74bb5a..7ea8201 100644 --- a/app/Makefile.version +++ b/app/Makefile.version @@ -3,4 +3,4 @@ APPVERSION_M=0 # This is the minor version APPVERSION_N=0 # This is the patch version -APPVERSION_P=11 +APPVERSION_P=12 diff --git a/app/src/common/actions.h b/app/src/common/actions.h index f6cc5a8..cafb48b 100644 --- a/app/src/common/actions.h +++ b/app/src/common/actions.h @@ -45,16 +45,14 @@ __Z_INLINE void app_sign() { tx_getTxnHash(txnHash); uint8_t publickeyRandomness[KEY_LENGTH] = {0}; tx_getPublicKeyRandomness(publickeyRandomness); - const uint16_t totalDescriptions = tx_SignableDescriptionsLen(); - const zxerr_t err = - crypto_sign(totalDescriptions, publickeyRandomness, txnHash, G_io_apdu_buffer, IO_APDU_BUFFER_SIZE - 3); + const zxerr_t err = crypto_sign(publickeyRandomness, txnHash, G_io_apdu_buffer, IO_APDU_BUFFER_SIZE - 3); if (err != zxerr_ok) { set_code(G_io_apdu_buffer, 0, APDU_CODE_SIGN_VERIFY_ERROR); io_exchange(CHANNEL_APDU | IO_RETURN_AFTER_TX, 2); } else { - set_code(G_io_apdu_buffer, (totalDescriptions * REDJUBJUB_SIGNATURE_LEN), APDU_CODE_OK); - io_exchange(CHANNEL_APDU | IO_RETURN_AFTER_TX, (totalDescriptions * REDJUBJUB_SIGNATURE_LEN) + 2); + set_code(G_io_apdu_buffer, REDJUBJUB_SIGNATURE_LEN, APDU_CODE_OK); + io_exchange(CHANNEL_APDU | IO_RETURN_AFTER_TX, REDJUBJUB_SIGNATURE_LEN + 2); } } diff --git a/app/src/common/tx.c b/app/src/common/tx.c index 5dc30e3..20aed95 100644 --- a/app/src/common/tx.c +++ b/app/src/common/tx.c @@ -74,12 +74,6 @@ void tx_getPublicKeyRandomness(uint8_t randomness[KEY_LENGTH]) { MEMCPY(randomness, tx_obj.publicKeyRandomness.ptr, KEY_LENGTH); } -uint16_t tx_SignableDescriptionsLen() { - // Return signable elements quantity - const uint16_t totalDescriptions = tx_obj.spends.elements + tx_obj.mints.elements; - return totalDescriptions; -} - const char *tx_parse() { MEMZERO(&tx_obj, sizeof(tx_obj)); diff --git a/app/src/common/tx.h b/app/src/common/tx.h index 15e86de..93a0e74 100644 --- a/app/src/common/tx.h +++ b/app/src/common/tx.h @@ -54,4 +54,3 @@ zxerr_t tx_getItem(int8_t displayIdx, char *outKey, uint16_t outKeyLen, char *ou void tx_getTxnHash(uint8_t txnHash[HASH_LEN]); void tx_getPublicKeyRandomness(uint8_t randomness[KEY_LENGTH]); -uint16_t tx_SignableDescriptionsLen(); diff --git a/app/src/crypto.c b/app/src/crypto.c index ddb2000..3af8a5a 100644 --- a/app/src/crypto.c +++ b/app/src/crypto.c @@ -117,9 +117,8 @@ zxerr_t crypto_generateSaplingKeys(uint8_t *output, uint16_t outputLen, key_kind return error; } -zxerr_t crypto_sign(const uint16_t signatures, const uint8_t publickeyRandomness[32], const uint8_t txnHash[32], - uint8_t *output, uint16_t outputLen) { - if (output == NULL || outputLen < (signatures * REDJUBJUB_SIGNATURE_LEN)) { +zxerr_t crypto_sign(const uint8_t publickeyRandomness[32], const uint8_t txnHash[32], uint8_t *output, uint16_t outputLen) { + if (output == NULL || outputLen < REDJUBJUB_SIGNATURE_LEN) { return zxerr_no_data; } MEMZERO(output, outputLen); @@ -138,17 +137,9 @@ zxerr_t crypto_sign(const uint16_t signatures, const uint8_t publickeyRandomness randomizeKey(saplingKeys.ask, publickeyRandomness, randomnizedPrivateKey); if (error == zxerr_ok) { - // key will be used as private key: first we randomize it uint8_t rng[RNG_LEN] = {0}; - uint8_t *outputPtr = output; - for (uint16_t i = 0; i < signatures; i++) { - cx_rng_no_throw(rng, RNG_LEN); - error = crypto_signRedjubjub(randomnizedPrivateKey, rng, txnHash, outputPtr); - if (error != zxerr_ok) { - break; - } - outputPtr += REDJUBJUB_SIGNATURE_LEN; - } + cx_rng_no_throw(rng, RNG_LEN); + error = crypto_signRedjubjub(randomnizedPrivateKey, rng, txnHash, output); } catch_cx_error: diff --git a/app/src/crypto.h b/app/src/crypto.h index 41112b5..b82cba0 100644 --- a/app/src/crypto.h +++ b/app/src/crypto.h @@ -29,8 +29,7 @@ extern "C" { extern uint32_t hdPath[HDPATH_LEN_DEFAULT]; zxerr_t crypto_fillKeys(uint8_t *buffer, uint16_t bufferLen, key_kind_e requestedKey, uint16_t *cmdResponseLen); -zxerr_t crypto_sign(const uint16_t signatures, const uint8_t publickeyRandomness[32], const uint8_t txnHash[32], - uint8_t *output, uint16_t outputLen); +zxerr_t crypto_sign(const uint8_t publickeyRandomness[32], const uint8_t txnHash[32], uint8_t *output, uint16_t outputLen); #ifdef __cplusplus } diff --git a/app/src/crypto_helper.c b/app/src/crypto_helper.c index 7ce0b73..87c23c3 100644 --- a/app/src/crypto_helper.c +++ b/app/src/crypto_helper.c @@ -107,7 +107,7 @@ parser_error_t transaction_signature_hash(parser_tx_t *txObj, uint8_t output[HAS // Spends const uint16_t SPENDLEN = 32 + 192 + 32 + 32 + 4 + 32 + 64; for (uint64_t i = 0; i < txObj->spends.elements; i++) { - const uint8_t *spend_i = txObj->spends.data.ptr + (SPENDLEN * i) + (32 * (i + 1)); + const uint8_t *spend_i = txObj->spends.data.ptr + (SPENDLEN * i) + 32; // Don't hash neither public_key_randomness(32) nor binding_signature(64) #if defined(LEDGER_SPECIFIC) ASSERT_CX_OK(cx_blake2b_update(&ctx, spend_i, SPENDLEN - (32 + 64))); diff --git a/tests/signature.cpp b/tests/signature.cpp index c5d8ef1..d59dc26 100644 --- a/tests/signature.cpp +++ b/tests/signature.cpp @@ -330,6 +330,168 @@ vector signatureTestvectors{ "95afb5c4bf1626a8c29a5e1e105d34a60ecd67f767", "fdcb0ee56604e12a0a4fddd7ae460b0e0ec4c2c6a9473485632a9233b63e106bed191483f7c2e8c227dfd0027f054cdddd1f1b107995f1e951e363" "798ab23700"}, + // 2 Spends, 4 Outputs, 1 Mints, 1 Burns + {"c721ff947a98b01228e380b49514d424f14c47e345a19426c33dd3016ed634d9", + "020200000000000000040000000000000001000000000000000100000000000000010000000000000000000000c8b9206ecd5ebb6688f08b212695" + "52cbadb256f79ffa3bbfeac2303fdc79686e6b348602655b6325f6261b35c077e596219af47e5d078900fc21118c87b3b1016b348602655b6325f6" + "261b35c077e596219af47e5d078900fc21118c87b3b10181ec636b0ccea1ca8a01fdeaca11e44cdd331d59c6294a0fa4ad5d3a10cdd7d7ad584499" + "d641c27a86c61d29ed0bda9ab06525c345589edd91b5c960ff63c84cdc624cb7ec86d4f73569fea4cf7074a9facb21d2d0ce17682febe3bb8c00ac" + "e801c624bf6647689e2a72d2afe83baac5879725892c1bb9a2da173e3d9ca4daba080c9ab6ed9a13fccdfc001a8c0e10bda914ae1910f9e1771f04" + "0a92eafabd134ce953212cd4e4b77efb71d55be8483237713b5574b3c09ea7cb66cd36bfd25950ce2e05f5651b5c8bae892c3355087afd31239d13" + "8c7f310ebc76c6155fff86bb30a2876fceb708169e52ae89796b37ca8a432ae6dcc5e42681fbbb9aef752a78050000269fab569d68ce08024ed98b" + "6138055e045879c43c0dffb24c7f1947faca5206000000000000000000000000000000000000000000000000000000000000000000000000000000" + "000000000000000000000000000000000000000000000000006b348602655b6325f6261b35c077e596219af47e5d078900fc21118c87b3b101ab83" + "fffb4ba280c7f167fc04f9f6b41cce5b481365fc36c695ac3bfdc327cf2e33c0cc95eb3da526f38caf0baff3f0cc98e61d6e2b13313845df2084c6" + "ae887de119311409cae1f453626b6db2e893f82009245fb88694ece9a8b94c2543da620e9ecfa6e5e38a5e965b3855b44b0af4a6a39b90dba10dc1" + "965054c856d3aed0c8b148e04e26c7a848a0c73f8e1f5e5ea1925d1ae212102e0b6b39a99cb75e4a10e3be0d3038ab2e171dc663c3cd01a9cbacc3" + "fe63f7d62158e192dc7d241cdcac584e9535441ecbf11ed1033072d6c5dce8e1073254673523bd15c06a5566157de78a52c502d848d48fcf02f561" + "f2bf465329ebeb99b5b893eddc5071d7e36d78050000aea034d9c79ed47da4b60db0201722a1b483235f1360be3d558b5fcd95a74ee00000000000" + "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + "ac7fcc7378671934246d4a88e0cb184811e1f5ed5b65a1898359a4b0ae0ad8a5b1c7b963227c98ee8a5094d7baee5c10a76068897dd227193b5ed0" + "4333876a851642a812a2af24a5ded6123f559f091307f4f970a7b16117d1f3d7c4ecf09c2504b1d6a4dc0db2beb555b183ee7d35d0cb2199aef5e5" + "e47833cf8287555f9c106bdd988aed93efe438d718db49e1989896f33ba055488f5efd443fca25a619f29af229cb21ed277da524ba16cdf8a5baca" + "213d92a4a058845de3277571aebb4d86087fbcdf7e275f0bb7fd34676e39789e2163b48a612449bab708f165942c144b0c8507ae0104a760aecd53" + "3cbd8f39f25f2fb020bbe83b72e40ca4cf99f67217e57d22d5a3a7014feb1adbdafddccd0e85d79abfea530b12634754494fe7c008231f129599a2" + "f05722dad0bd5b85f8dc581be50170df179228a89a135d51832c37b2e4392ebfea6b6f219ff06fcba1f2995b6fc1423b0227021d2ca179dbf3cc0f" + "bd4eb3a63198b441695a4d81a7a8060fd6649a02c2d7c28d56ca1b2d5f86d2e9f8fcfbbd940c61b596ad6b5d1f0f6a28a8f0871008b79bfe82c425" + "842b8eba7064d101c99e0f3d1e663fb6afe5fade707a2e0de8a09cba199de070490af60b5ef7cdcd923ef51dcfb17da2691f540760a71818443bb5" + "813df98483722a72dc6499d79b6ae6c8ee78c35357e8744582e092399154e7c34af81d362a3fa5756fffd0bf0255aae9a52a051bf7552096b549d5" + "5622976f7b79c46a9bbd7d3fed18427818472e5e5083a71272f3913687f0e9df000b641940afadc01b625f11e1413a2773cc9b1cc1614e09671a52" + "8ffe171b8f23f7297102d296082dc1e521f392da50a32172e09f09000aae4b00002fa4bed1b133146e079edf1c8fe94931bffa3c7fb97c6cd798bf" + "6bb2280952d29081db4f277732808da99ac6af2874baefd97fd4cb64a4eefa434d6a2044a40ea7d1b7ab3674819ad5684221a2f35b9d2297ae7c3a" + "16399ed3e8853df873d57df4a23a237d020d18c04f1157ab2a4615019523c6a0e9a8f6cca7bfc25f72a95bede530de44cb655b000ed77997206005" + "e155630d0d08d2165298debd51976ed5cc2cd4e734b7121010b294de4523faf46227fcb5c9f6b4e91fca91447239675e148527457cd0011720d6d7" + "c959343f756528b7fd02c8d2764b4fee2ce9a6789d04424d002a7e48335122dcc49af5c392db0805b53003993eff1766bf0bdd341e6382a4893c98" + "518d0e62c5a8af5fe9ad55ed3e57c0b49497a782001e681ce0378e1b00c074a1bf4075693574a2c21edd275733470cfb62eb5feb2580cc53f26bee" + "087e060afdc27f6416d62223c0269423108fe893dfae9382d1a454c9c0e9aa323820d6a3aec25f432b9f42ef772f6a3855cd891cc21f9b87a5083b" + "926876a9db86c7d56e4853da8747d2b6ec6e4cfe55632a2e5c5c6a330ba2cd352ddd911b1eae49dfb0a27da4d061ddfe987902c43dd00c83e19fa9" + "5db1fb8f0136d84622bf310e03d1a7044d8f685c612bcfca9f3a8e921c3ffbb05308dff068e418d225142cf6835c7d83e3a22dec4f1b6544f7413d" + "720e359a353f89f508632c97a4ec810c6459e45cea12788d48f1cfc01565c56d5f4737a96f67b6be06f07ce39d6ab90e2cbdc03135f42b2556c6cc" + "3e4de19d95ea0ba6e03222c555be33377a2b1af3a1c5f73aae39b32a2b937760685b2d616ccaf15fa47bae4471c6062d0974e97b3f361102e3f765" + "efdf9bc2d671895d47797a947390f41bcdc48cc939303bd499aeebb9732263851f9dcfc296a68bf7fccdc6de13418c4de8f507526c6ad1033f8f99" + "86e6778506fa3aaa9add236b32fdd3e070b0e2516434c80ba61ec984cb826dc6c962f374b72e4caf54d83595b51a4808ef77211afe45e8cd1800d6" + "5477d325badf19ca5579895a313994acd6d74fbc0a8bdc50b429fcf1744f27fc40f1235d7beb421cb5500f30dedb2e9f61921314a4e213aba87430" + "6b9d31bf9090fe53174605a46900e6eedcd468dece758f0a5ca1228540a370f9e364108a5160bdd3e823c98a183837ef11313ea0d8cdc6fae6481b" + "9dc4ee56fc5d74d26154e0991f9633a4babf691eaa255b8451371114526cea891b4e00fa0b9a3e3d750f9c44ec4b4fce69dbf1c3ae2d0df52d420f" + "03841fc654956c23f9d792cddc79b3487922651afe9b51263af08c92baf6acca418f9551d99f1e4d11db023fcdd2e76d8692d987d67f94b7fdeb33" + "3843f8791669472611c94dcef878bfa3d0fe65397ec44ec341b0a4e18a12c6154275281c7ea986166770f101f209eae5b17150f6a6fe71007b1b64" + "75565bff1222c991f7669ea8a319bdb83abdd4909d3138f917c3165b9623804305ffb66000fa9ab78eb5999dae32c90f8330d33b951b57646f0afc" + "8ac92fe614f88f7c27c8e793a8e1dea6850f0ca76374b64cf8074e320cb66ff88cc7a21966da831e07cd37e89365596111713b029544c12972c6c3" + "7fa8d2d1869bc8466032c4b4cb9be988895191e550e00410dc6ceef25591bde33fcf80573fda0d4f9219bc7996580e8896bf22b711b9a1337243a3" + "883bc4e40c060847eab8c6f7e712b7f8f021b367bf80528563b07cefb42fc7a499cf0dcd18f7acc556590c5729e1a051d89353ba3210312102360b" + "c8fec207acaecdf34fb92d7e1261c40226abd64131ac305eed221d82eacbc621ac105d5d8875497c197244a2d989eaae5e556110b7a17be8fe98a3" + "0b4a4cc5fa8be93cd9623a155c602c8d61f9ce6da914c9e3a36489dead865fe254aa82809b5bd99226167e71e9cf85fff6ac11aada90582c4e0ff3" + "13a539bf4219569191d3775869dc90efa4369d94fe880b8d7c4a553781243c924ff2eb545d1a0efa20bbd9815785ed7b16ceaa46ad48c54c4265d2" + "65b1d34ebb63e3ad31ce6df624d2156b348602655b6325f6261b35c077e596219af47e5d078900fc21118c87b3b10180da021df2394ea82d0ebe9f" + "e92a2b726f671c46ebe5d1c87f22a2aa197977b7690068a2b99266767d231c700e53a6d78b115888ef2bd2359779a6f74af6e0f461257d1988f137" + "88c2a20c973c9e76444d46684e58c54809e3a18303d9a323bc1845cc6117d2d9ef435b52f4fe78489b8bb3c89bd0dbd4fd9f1f0a6676d804e1a09f" + "baf93aee7f22f4fe4c5b18bdccb491dd158052d1e7242e9a770a99d0aadde2ade9a422f972676f0b65da34d513da2ccd24565bdd078b543e6ee175" + "ed5b39c73c1a08b7c590342018c3d2b9334a708229ca49657286e7a00d2c53c9f685a354657374636f696e00000000000000000000000000000000" + "000000000000000041207265616c6c7920636f6f6c20636f696e000000000000000000000000000000000000000000000000000000000000000000" + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000c73c1a08b7" + "c590342018c3d2b9334a708229ca49657286e7a00d2c53c9f685a30000000000000000000000000000000000000000000000000000000000000000" + "000000000000000000000000000000000000000000000000000000000000000000660a40d08c61bb270fd7557df83cddd19b87cd7893be7bf34cf6" + "20d47b988f690200000000000000a7cfa0f4294309805cc3501ff92cdecd96ed672350594ffb98845c7cd1e574e009ca99e03aabce7d26fe313c51" + "2dfbbcc9325b17e01c4c72e68b5bce3f07930a", + "7c833e9092df350fa295686cb3901227d9463d85ea86f4a9552c38d553fe78b6", + "e8b1a1e32c2f770c5b7ac09506ed5b7f682f90203350ab56a807ed286530252735710b1be6c4ca1c0986f58d2ba0f38e3415cfc03e126c9e7f7b4a" + "5f992f7c93c4c1264f786a0a1b44190bf479e9e34d", + "3c6dae5c077cc6efe79b0d6b261623b3cac7415268d83b9524c5a47d62585520aee341a972e7a2639cb56cac94fb0de91eafdd2a152a654a1b108f" + "9a65e5f202"}, + // 2 Spends, 6 Outputs, 2 Mints, 1 Burns + {"a419b115b96e55875a9e259ad0cbe7c889948b6d3f7b03e4176274e0666a48ef", + "0202000000000000000600000000000000020000000000000001000000000000000100000000000000000000003d4b6d6a119119f2775a64db8c69" + "bce1a9c19b7786d26ffbf47b4b11d27ad95ee0a20be7f57278e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110ce0a20be7f57278e50d" + "05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110cad6dec462f0e776289c0cb89ff344efebc255aa8971af4c7a89a557d3d98efaa2d77e00d" + "cd55f9403f2268c1cfa156348563bbf9bf7f1d576e9098d41b96b5a9227c8462a91c4ee2bacdcb2368d65bd184cca5ed87f61d52ef116e788d456c" + "ef0f989d69632fff3be8ceb75439c7d310fa332edecbbd0a6145ad513086e5eaf15400eeb824685fa5efb0389aa8cbdbda91bd3dad85c79d2036d5" + "3ac824445dfab2e16b68ee8e4084dbcc1e9960ab0914b9c6c82ffb8362f280ba49c53c65ccc4e7c43fa19bdc934f6be5cf140705acea770062a43c" + "5dc24e29a009605a8a845fbd6c43d21f777af45adb1e1472da099591737642abab182a1d7d24a1fd559e43780500004bbf0e3f2ead7c7aaf34c81f" + "c5e89e0ec7b42d9ef45f9ae11218c332dcc07636000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000e0a20be7f57278e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110ca8a9" + "5853a6152a53d5b5a8491db0b2cab92c84b40d2db04738dc8be8f3563bb9a591745869247c69cd2407b85859ca8ba704ae7ad6e907824dcf4136a7" + "579f36d6082c7f91db7080839bcc2a1612d41b0b6789a743ae4ba2a3fdfd4310cc95c210d9773cdaa143e286ef837566e33ce2cbb73b6227c98503" + "520697f4b603ba0f786fa7b6653eca28fa9e8d8626b368c7a0100e0a198ad9b33640a57d246cab5f7b82c77f94209067f8d83e9f20ecd9dd01650d" + "4f4880147207a359a6e083398e570be94161c04745558f0badac97607d7c016923dba282180b4efdb1c5e3fdb031f9898c96d1d037b2c26f6e9f0d" + "dcb633a25a60f4019a7157bdc5f18c4c4e4a78050000db6eb7190e809707084b37ec5f0faa97f6799304c0d21ef30f36e35e520202f90000000000" + "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + "b99e8b273922ca8e0bb8a83e993e39d414ceef58f79c4864a56c0ec599e722cdceb3d4f18eab3e6f19365dcdf122bc159685fcf52d1bd16ad80eb9" + "e3cd3fc208bd5b84ac72c0b698a091ed4a8f4ba9f886ebee44fbd46608f1fda785ffff80b614d2cd35affcd1137a637aefed866826c3a8aec2aac0" + "7f961bcb0957f9750750eb50f86adef21120d9121491665ff0c0807fda2ce96f0e414a4f860ee7eface8d59ee104155ba16659bd987cc642ee906c" + "068981a2bdee6b985646d3b63c1b76a03b9f975b91b415bd92052b39dc528064f94c565a08739ee856afeaceded535a0014e1ff1f6f75ef377db82" + "1bbd93eaa53b3c941ee41e80be87d36c522c176a264ec714d655d80be0a4296db44b717c5334de7f283ab96e6548311776d5de3c399ef95d6753b5" + "cafd68614db22ea6606744fa6e2fb7cb27928dfa7472bfa77a574bc8cd055b749148be813bd0b5d42bdd5595f755069368a245a1c11a24c79f8745" + "97847a1d2d4468bbf78e469b099f48f580aa17780630dee20c7db45bcbba1df1411c7e9dce47ce9d7310090d8fb58efee6e05b1492d039e7ec785b" + "3f41d52ac68b0470dcdb23a372b031c2ba8a6ffc700c730531722ec39761eb1da7835deb44b83a8916d05ca0885de035c7599e1a0bdfd88626ee5d" + "5168f634c39d043cc0516b61a4b8246f6cd3e2e6e35892baca134913f214046cfc6f31551c273d154cdc5d08d62fb7808977ccd9a5b1ab3db8577f" + "f920b183d9211f663094adc1e22af81225923afe4a4f1090a22d6d71d3ebc944facc1080d5aa33e6cbbf6ead3095a8f149f5f43a61377c95b18de1" + "8347e1e4a249fb932c0a7b63dc53acd5145dfc4c8f501652a7bb178414c97da7a31660d1419edad0199f7032d7bc41892c63433ad100dec12a9bd4" + "6413159e1d7d6dd9675ab8dc85b88ca7fd15591e3a7ecf0664c2c872c1186c573ea994c47a6b9ed388d976722c93e96be80cc0f6a24df59bf3347e" + "296ccacb211d7d9e9d9077713606003523e162938d966b4406f9386f8d7e6b4c3e6612ad35dba950b271b691d8f35b5ec50430979b7eacdff5b9b9" + "02768d90cc04b482363f12136cdfbd790616ed1681303674234be264c1bf8163971afcbae99ba46b47677866c0e80406785c5f0f122e4b058af30e" + "ba808cc37fe094901ebfcf2ebcb20c594e2ad5cf583a72ea665d6c759ae339fc617fc55d8261e5d48867dc0709524921a5677f3460772a1a2d4fa6" + "04a885455c6549651941f25a949865c757a3e41323be4f833fe4dce38ff0fb3affcf15727b4ab3a4d02aa42cabfae9b418d2637f950c4c474fa70b" + "5c40a6b00d50f696e46e4652ac54f51d8963bb5eb4bf93c50a0a41cac7c722d41ad8a9bfeeea690b91901e8d1b2e25f46a5873de676c935219b148" + "3108db3e39d4f6bcd6ecf041bfb10aed9189fe0acc29a8ed4d792318714904cfab00e4553295737f32d511e972af845eeecad89f18823f93cbf441" + "baa4594c35b4685ca27b158755f0efafa66c5c31ec744c5287448843f3f614eaf00f2af121debc67340b8479b9c0b621f61c74490eaa4ff5730bf8" + "41cda0b2af3151ca99727dc75b608e0b60e945847e87e9e8c3969fc4a14a8915bddbfe06f3532c7a91bbf37eaf49b2c8a5baca716862dc60752c44" + "a615a454a8ab3418010d1f840ddb4acafc32894c9c62c0273df22ed3585022db8cc8b5130898a0ac322d68201de0259d317289cbf627dc0b178edd" + "8f397b3b164c8b21254c7711058081e2f13d56d838fda085af5cbea790870664f69c413bec3838e4ac1795727ed20a0eec3cef840d17c158506109" + "a92607ea0111f59057c20403914bbf454657e324bac340245f0f871bdeb9af1c3bb822fe8928ac8657724f6625a5658798727b12f98c4004203f7e" + "27c1b40a99e3942864d61d925368fa42abfc9bd21393a33cfb002f35bef3a77c1c52c06ed1d9451000486defbeb302e6bbd58bdbd3a816234611d6" + "fbb0eb33833ce4c93e1c64380144eda4bf43cb98ad2b50f0fc19ce1e06a2fa58798513f7088197f94f07f64d573d7c86666f0c91eb8a5d10f18dc6" + "f8efcf40e9accfa7160dc35f625d6cf449ec5d5608e346d4064df7276f7ee09a1cc587db9c847dbfc5e6d5e3216b96a703886413fd3a1480dc3cc8" + "226d4512a8ab7609dea660d867029ce33e18c6d14a34dc43691f8ceff5a057d82d827a53b2ed98d55f1c0e5bc0397ff8ebe932eec142f7d41b4d5b" + "9adc5986df442bc72e9fd94201c96cb35afdaedd981e48bffd4131a362f32a230487d562a70ac7e73968f6f6fc4da8ac2dd933fd89c6493143f042" + "563325fd02c6489e3604f56fc4daa9c6f7702123732ed1976236e639386bf42527fdf14f0b1665b14bc59038011726d3c11695bb8c1b297ffbbe4c" + "8812cd5365fe55580b6999f5f687fca1e7c1c2195bb2cbeda36d5b171d57b9d51bf90b2980ff76e8f41bb1fe3aad9cb97769cc50ef7513513324bd" + "fbc7e0aa1c212dc03952873e3fe2fb92b0868cff1884a7b895e090ef3646bfe12e554c50b399883d404aa800f44837c2ddd6f394e545014725d226" + "4437425ac8394e187d0366335750c6e014b6e3b783e7e48148483b1cf6a47b49b70c43f1ee3df1ffe59dc43105782221212f3d3ddc9d830bd28bdd" + "ca26e136c78360ccbb465c77b3a3613999f6c8a09316d50b7af595f3fd030ce77ca62477391509e9055ac3d235bfad8676b51f697831dd4b6e1598" + "52d062b4f77215e0742c68d494ed438e77fd5ad89f6dc7cac095ba87def81667655f0884a93bd7562c74c58a1d5c03f89f37c01e1898d31d44e2c1" + "ab30e6d353e60a12b9ce34b83eccdd898fd19a856508d0abeedfd8f2ad1b8a975c3a679df0d3c96f2b67d06f36b976bf062187880b8f70e20979c7" + "bf5294a41e32d41fe230142bd04b12aa5ec8a5d86a6edccfeffdc15784fadff36763949239c57e2e0240de37aec9eeaa1ff5eee9d74a6100b61c41" + "0b2aab51ad8676b8ba49796c2c32ab95e60977e1ebeb4aecdf60d65a9ae1af788d40d2373235ebf7d14d154d9eb0bd2bc11db884013f910c50bbf1" + "f8f33be8ea3a1faab91a0d940fa91c4bf0a780a9f51c8e0b986c1e50c4048b746f9f283add7df4117e81c653a06d0873ba704e2708fdf7f85a656b" + "7b6fa447269db895d0c0d8117f8f74b7d8a80635c24d64d5fd5866a0a2b86858f88ab1219389c0e9c76d999a7ebdfedbc561e24194131943045a96" + "f50293844e49abed53a7669b568dd50fce9cc7b1943852af43bcfe0a08f68b1fda352063d53c3c8b1a3af0e9eea0b259d1e7ef0fab767516c26b40" + "94ffccabbf4badcaa6be316f11bceead3383555793a7f641c42f141ad49ebd6ea0eb5a77dc95bff683388410c16ed2a2575b606e88aa29d67079e3" + "1c56e288b5f42bebc7500923d58765d1994790152cf4dcd54bbed92a81fe020ba2e74f97d73f83ca5ff763df0d51500fa71887df1053b1d5e83940" + "67b4b8d02263cce957b28499d417a81aa6bc9eaed7b259b8875fd74890fd63763f5d92cc4bd2c072f1ad659045186c347839b52c71a033affd2351" + "c8dc30111a2fc2e5c3d0f4df2a5ae4d8077aff77d8911de9af8492bf665c328cbb63e4044760f4de518a0390fc814f050f8153b5f394a16159d030" + "845ea021a8de09dae18bbaf7f84d77fa06ebd6a77fd7a58e4e3b61d3d7cca7f45aa09eb43c42f8e0b94783cd3d6d153dd670728c8b31d735ac68dd" + "8ba4d5f5533f9804a8a3ea2bddc638d2b3e827878421c33efd4bce8295d1813724db9a3e64209c6d4f0b56eb78348612bdcd2446104935d6b7b4d6" + "34a1d81069a359aeae0a8d68b433328a6716fa865f2c8f9ebfadd937768ca1416f732b4683e3c80deb0a31721df6843763a18addf37745e043a49e" + "d255addd7b1bfaf687feb03c3041ef41ac68cf2e79488817fddb2591014aff2b915d13a85bcbf358fd0b77eab81599ba13d61b47012334d5e9e8e0" + "e1676f83ceafff38e21610a58a02d0e11e6d0a077d09cf3e77568594eff4dcf9a3d18b35c11bf8d5c135a288044b35b41d777ff2db7c1d422aab6c" + "d031d072e66a64f65de63e0a7c1f65cd1ca081c90f02032373a20d05a5fac0c63246eb850d941d01cf6ee7ef4ad64a16f848bcffaa9f82bebea432" + "eb41d73e9c3d2045e0a95f35749fc21072c80325544473426f58479a1f5fb6cf5f483715afb242fff7d10b7ae3f8bf5b97e6b95a441b9cd73d5038" + "b9b5e19e4ed091afb430badfc8654965b89080308827526d4319374d167df69f4213d2c3f65ea863b75b7cc7912a72935096f7c66df78a707563a8" + "23eb4898a5dfe86f67b3f8d4d81f8af4fe4fe12a409272eb5ee02d9edf9b57ede80941a37ae5e47a9ac7929239e0e65dbcb0afc8e0a20be7f57278" + "e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110c93f374b43bf10a21e54032ac63b9b79119e1efe4afaf545867a69a5775c69d482103" + "cbd52d3ebecb264a4d98d3147cbc88c1a4418098446f72466e1060f86bdc216ddffc25ff9ef627256542028969fd2f0fa5aa5d2d9cf89c1efe4769" + "fc2fe10f5cc9dd8f4495f1e376ce148f03d7421043d18c10728dbf8c3f80ff17a8dd59467e824f67bf62a2d695bcf7ad427a7c940a4b6109c7cef8" + "de0d69a6f87e33f986341162fb9bf228a149b7971584155bfb9e787e4c29544ccaf7b7c70d74a4d78e52580849d7b5851c34ee8b67c9fb5a85c8cd" + "2bff36140883755c5f2d05668d54657374636f696e00000000000000000000000000000000000000000000000041207265616c6c7920636f6f6c20" + "636f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000105000000000000008e52580849d7b5851c34ee8b67c9fb5a85c8cd2bff36140883755c" + "5f2d05668d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + "0000000000000000000000e0a20be7f57278e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110c8e48070fade17150606e1154949f717e" + "7ee317ec0d6b6f2c8922a9d65c3af10518d6a88344477c55732f7e7ea625f0ee9054f6a22b1550966b81a8dbc67b87f1601818dd67d12924696c9a" + "3d19e5d454394951b9c81d1496bfb76f9c9d124db40a321f2fd7b83278cb76ff313ec2044bfec73b1606b82e67d69ea967704d8cd027a65203de39" + "581076df6b9fb11f8bfd839a156c6ab4afd5a3643e600ef91df624a59839446903aeab89bfa2ba99897a1cc9a7339d0b407388c098e80792fc5e8e" + "52580849d7b5851c34ee8b67c9fb5a85c8cd2bff36140883755c5f2d05668d4e657754657374636f696e0000000000000000000000000000000000" + "0000000041206e6577206f6e65207265616c6c7920636f6f6c20636f696e0000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000008e52580849d7b5851c" + "34ee8b67c9fb5a85c8cd2bff36140883755c5f2d05668d000000000000000000000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000a9928954d4c98686796a2b214443b90fb8d44f5297006c80ffc336dc4f0c" + "30dc0200000000000000cea785ae2b10384eba0f91f6dad392c1b07a7e099a9efe49a25ab38d43cd660d1ba4283a4ac95fb5504ad44ea8f723cb47" + "45c2c713270c29cb84f65b6d41f903", + "80eec01d057ec69a0083d06b8d9a519164d34136b666a8ce3166f3f7e8f5537b", + "e11fbb4345c962d8a048debcaf22ee9573a3c4a4d993b7f939d443c6b7cb128771a6cab1844ff63517991719e3af60ed6371d890cedb2b91690360" + "8f2fa912407e7c6646e93bc937dc8165287effc1be", + "ba19f91104f1eecae3ce596f71d27a79444e88201840aba5677b727fecb5404c8580a2a836026c8177a237c68e05471213949c22e88318bbf43e76" + "6af0811f0c"}, }; TEST(Signature, Signing) { diff --git a/tests_zemu/snapshots/sp-blind_sign3/00000.png b/tests_zemu/snapshots/sp-blind_sign3/00000.png new file mode 100644 index 0000000..60e141a Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00000.png differ diff --git a/tests_zemu/snapshots/sp-blind_sign3/00001.png b/tests_zemu/snapshots/sp-blind_sign3/00001.png new file mode 100644 index 0000000..ca94e97 Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00001.png differ diff --git a/tests_zemu/snapshots/sp-blind_sign3/00002.png b/tests_zemu/snapshots/sp-blind_sign3/00002.png new file mode 100644 index 0000000..3fe010c Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00002.png differ diff --git a/tests_zemu/snapshots/sp-blind_sign3/00003.png b/tests_zemu/snapshots/sp-blind_sign3/00003.png new file mode 100644 index 0000000..bccea2b Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00003.png differ diff --git a/tests_zemu/snapshots/sp-blind_sign3/00004.png b/tests_zemu/snapshots/sp-blind_sign3/00004.png new file mode 100644 index 0000000..2b262e6 Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00004.png differ diff --git a/tests_zemu/snapshots/sp-blind_sign3/00005.png b/tests_zemu/snapshots/sp-blind_sign3/00005.png new file mode 100644 index 0000000..0184d5b Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00005.png differ diff --git a/tests_zemu/snapshots/sp-blind_sign3/00006.png b/tests_zemu/snapshots/sp-blind_sign3/00006.png new file mode 100644 index 0000000..419daf8 Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00006.png differ diff --git a/tests_zemu/snapshots/sp-blind_sign3/00007.png b/tests_zemu/snapshots/sp-blind_sign3/00007.png new file mode 100644 index 0000000..1e4be69 Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00007.png differ diff --git a/tests_zemu/snapshots/sp-blind_sign3/00008.png b/tests_zemu/snapshots/sp-blind_sign3/00008.png new file mode 100644 index 0000000..9b29b76 Binary files /dev/null and b/tests_zemu/snapshots/sp-blind_sign3/00008.png differ diff --git a/tests_zemu/snapshots/sp-mainmenu/00004.png b/tests_zemu/snapshots/sp-mainmenu/00004.png index bccaf85..a5f8360 100644 Binary files a/tests_zemu/snapshots/sp-mainmenu/00004.png and b/tests_zemu/snapshots/sp-mainmenu/00004.png differ diff --git a/tests_zemu/snapshots/sp-mainmenu/00010.png b/tests_zemu/snapshots/sp-mainmenu/00010.png index bccaf85..a5f8360 100644 Binary files a/tests_zemu/snapshots/sp-mainmenu/00010.png and b/tests_zemu/snapshots/sp-mainmenu/00010.png differ diff --git a/tests_zemu/snapshots/st-blind_sign3/00000.png b/tests_zemu/snapshots/st-blind_sign3/00000.png new file mode 100644 index 0000000..8d5b94a Binary files /dev/null and b/tests_zemu/snapshots/st-blind_sign3/00000.png differ diff --git a/tests_zemu/snapshots/st-blind_sign3/00001.png b/tests_zemu/snapshots/st-blind_sign3/00001.png new file mode 100644 index 0000000..ab2b514 Binary files /dev/null and b/tests_zemu/snapshots/st-blind_sign3/00001.png differ diff --git a/tests_zemu/snapshots/st-blind_sign3/00002.png b/tests_zemu/snapshots/st-blind_sign3/00002.png new file mode 100644 index 0000000..e8762df Binary files /dev/null and b/tests_zemu/snapshots/st-blind_sign3/00002.png differ diff --git a/tests_zemu/snapshots/st-blind_sign3/00003.png b/tests_zemu/snapshots/st-blind_sign3/00003.png new file mode 100644 index 0000000..72e2863 Binary files /dev/null and b/tests_zemu/snapshots/st-blind_sign3/00003.png differ diff --git a/tests_zemu/snapshots/st-blind_sign3/00004.png b/tests_zemu/snapshots/st-blind_sign3/00004.png new file mode 100644 index 0000000..59536c9 Binary files /dev/null and b/tests_zemu/snapshots/st-blind_sign3/00004.png differ diff --git a/tests_zemu/snapshots/st-mainmenu/00001.png b/tests_zemu/snapshots/st-mainmenu/00001.png index 1a704e4..67fba67 100644 Binary files a/tests_zemu/snapshots/st-mainmenu/00001.png and b/tests_zemu/snapshots/st-mainmenu/00001.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00000.png b/tests_zemu/snapshots/x-blind_sign3/00000.png new file mode 100644 index 0000000..60e141a Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00000.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00001.png b/tests_zemu/snapshots/x-blind_sign3/00001.png new file mode 100644 index 0000000..ca94e97 Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00001.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00002.png b/tests_zemu/snapshots/x-blind_sign3/00002.png new file mode 100644 index 0000000..3fe010c Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00002.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00003.png b/tests_zemu/snapshots/x-blind_sign3/00003.png new file mode 100644 index 0000000..bccea2b Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00003.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00004.png b/tests_zemu/snapshots/x-blind_sign3/00004.png new file mode 100644 index 0000000..2b262e6 Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00004.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00005.png b/tests_zemu/snapshots/x-blind_sign3/00005.png new file mode 100644 index 0000000..0184d5b Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00005.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00006.png b/tests_zemu/snapshots/x-blind_sign3/00006.png new file mode 100644 index 0000000..419daf8 Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00006.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00007.png b/tests_zemu/snapshots/x-blind_sign3/00007.png new file mode 100644 index 0000000..1e4be69 Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00007.png differ diff --git a/tests_zemu/snapshots/x-blind_sign3/00008.png b/tests_zemu/snapshots/x-blind_sign3/00008.png new file mode 100644 index 0000000..9b29b76 Binary files /dev/null and b/tests_zemu/snapshots/x-blind_sign3/00008.png differ diff --git a/tests_zemu/snapshots/x-mainmenu/00004.png b/tests_zemu/snapshots/x-mainmenu/00004.png index bccaf85..a5f8360 100644 Binary files a/tests_zemu/snapshots/x-mainmenu/00004.png and b/tests_zemu/snapshots/x-mainmenu/00004.png differ diff --git a/tests_zemu/snapshots/x-mainmenu/00010.png b/tests_zemu/snapshots/x-mainmenu/00010.png index bccaf85..a5f8360 100644 Binary files a/tests_zemu/snapshots/x-mainmenu/00010.png and b/tests_zemu/snapshots/x-mainmenu/00010.png differ diff --git a/tests_zemu/tests/common.ts b/tests_zemu/tests/common.ts index 6863af8..18195c0 100644 --- a/tests_zemu/tests/common.ts +++ b/tests_zemu/tests/common.ts @@ -49,3 +49,6 @@ export const spend_1_output_1 = export const spend_1_output_4_mint_1_burn_1 = '020100000000000000040000000000000001000000000000000100000000000000010000000000000000000000cc17f362e79c505cc2087e53c6b17eb449fe76852ddb717721ff2a410e70eba358cd6fcd14bc1f6ca285d23c51c49d03077e2c12abd63e73e6fa833f03ae280b58cd6fcd14bc1f6ca285d23c51c49d03077e2c12abd63e73e6fa833f03ae280bb730d903c34d79ef1e1ea2e09aa16ff29d6837a922ccd724fa1192218dfcd135749d7921677644a343a61be42c2dcc0dadcefc75f68646a6bcd3b530f0b4d2f7ce6230cc2c841291d2f443521d3f965513c839467449ed77bda067d2c697dc23162b7bbe5c70f275651840c323d908e8e69e296893b192b300db7b88a27281df56076b16113ef3c7358260bc204de927a0b906efb6df224ce163d813839d3a02cd0ace47748e9f1d0dd806c42a57f4932ba31ed800b59788b735cbf82bea2ef7c8cd6a13c18fe4c4d7dc407b94433186e8cd712b0462c657680f661a386fcbae3edfc09fc5cfe93d2229d72225d4d962e79ca893e7f1534f4f061a88502a500c7805000025354a2fca8b36199f2b4bde73fa8dfd54783b4829260143e3d4c868952cf41e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000085346d42da39d25a8f33382861e0752c084568b9b9bed37dc8faddb617fcab068b7c907374af698d1b1bfb27fdb5b64babb214563f576d2a3426a9672f3a98b9cf8863797d7787dff7fbec75a7bbb0212cfe2110f8d3ba2503d1668050d132a30c635d8112287e082db79a63a32cc3a010a61c7c7eb3db1840d1df9b80f484acf4469480b238e07b25666e64dfb8cbe3ad2e52a2638f6af31c883809655c70887ea9ca4b13c63901c33fb3abdc7422af44502bc09da52e1bb65a776b5ae4822a3282465b77032b5061d48418647bd3c8ba448b06b2429f188f26a0ca67761c028e0e8f0c2ce89ff3276cd57c0178e4b95b85ccb05e4c37c9d719a16802571c725cf712d5d8c38aeb7b781d588953212cf9ca06a64d68d7f82259a7781bf093164d9fceb3ed393f9b47001c3b081932fa17b5e7d3786d75f950da0b9ca118f1a86fb9c7fa36bbc8b31fbc5bd2700488f4f12e8056761b0aeb71970904b466a3ac65ebe046631e012b946b9375acc1616463211dd6c35c302293e10f9cc0b66769f92c5bc5d70137ecc97822f5b353fce5ecafaff9432288715af37bc403a1dce414e7f818839c21a68ec3174badeda54e2eab8048bded469ce79583bf19f30c2e167e29f4a3980765bb09d7d3cd14aa194680c7c97dc6800f193e8c663cbe4bfeb5ca3d2bc4b63d851b07907d4453756a03e4f94e3ddde3fe85ae62335c07ab1a89fb5ca5a5fd512a924dd6ab92381d16787bb1ae8b74167b0db7b04deec50753bef537ffca9a2908109904e5d98f53435fbc210efcbab0298394a1e8bbb141e8c0e6cc4fdc9d905e327df36af2e09ff22e6cf6b2cd29ce5f8e85ab3fe0d0796a73752f83255093f3094d54ce7789de77bf88ef81fc9d9dc08d4d917340bc3f4b85827e6124c806ed47a092657f8e9169d23d5120b5522ee9939231001d90a74c34e79edc5443519c952fe995650bd2e3bd9fc3cabc4e9cefea0aed8738709b3ef3e40de90ee13e12d604ff870442c34eddf121b4186e04270510dab936bb649f06124dfafce459b01cf7ecef56675fa84ff769adaa0eeeb042d6a22baecfa757adaef8b793dbda59da72faf281294a310cee94333fc4baa3cf8dd1398735b58fef0e291501a2a3515edf90f6dd17f66cb7c6340d6998e6e74f5dbd8c57b24aa2eb29686cef57ee9cbc6589aa1425456e36df43c807372224db320dfce8b4c0d6c7cacf70034818ebabcce377134d85f9bce38b8bbeb90e91b27198614f1f700fed1263ab5cd08b5a0984e8954b33fd2a87f59ae6d6003446897aec048ec492bb2eec9e667aca3496c3464735bc495ab86106f61defc91896c00dbd770c1015ed53725195748bde73d0394e6755caa2745774e6044e72eaafad6f974c0773cec062db2d6154e68541abd4eb01c040d645a45ecb9d97b1fd224fecf3d01cdb785f1a0c2dedd326b38bb47428d793bba1acae299d91ab368072e6874e9f6cd59b98f1f4cee8b3819cdd05cffbbe606664b82501f17af05ba057e6a856097527eee783f48279bdcba6b05cb247d28fc1f47962364f9ca16b7c55be4b36d34df8441a25f77da08c7c7492ee66230effb8e1f8027b017fd1a2f61ca93301f1ec9a9a5b30dd33d8124a8c902d790c413ba1f77d94773e86059faa3cdd7f66a3aa709820b6324a4440f419b1f4b460dd9004972a981f8d821a499bc97c3ecea29c0c071048a9fd92db521df33bbc717220e72519d1b58cf9731d36d4eab0211515b2db4dadc599abe20acfcc6ccd027fad9e77ee78728028211e3f06e8827d6360bc80dc47481da994a3f2a6556e3e9df9d2624ea8fa0c4029f2e0545dc43cdc92ee12aea4f637c0e44819df4df50563ae25bf66add4b3191f72cbf99f8fc28756b77d1f57e7fadd0b0130455800aa842cf0b448a08e2f310d9a0d60da1c956344f2775fc2f3720f560f2b71bd477bdc9200c92180b07132cc1d772d83644c428a464935d18ccb086fd21d44ebcfba6e394efa0e4f2467d6591799931e401a3fb091cc718b13a51aaa63437db6d89deb53cb3305f582b4d8d5d17aeda9b2d4c20efd21dc27bcd3c07d4342505c080f989161108bf736c42d5169c458553304bf30beaba533fb10eda27456fe0ab1124ba57d4640920e6a77066626288b3cf50bc44ace59a051e6cb50201231767fc024f0590e19415716148cba36c1a4d7d1ffcccb37e2e2987dd592a65fa578751a6b4e841f70f597fec0b75df64bcd3802cc4536e9a4e635e28969590bf6ab9452bef58b58cf796929763b87842637bc081ac264c9157256cb71298cfcd49faf9b08996b756dce264bd88782070a0b70f66f7a3b619e3a9bc251415319778b4f6321362088e693ff0ad2fe8e10405cd1f538a364fb5c6ff45e4781d1cfc2a5296cd105066ded937d9330020712ed3921d4a3c52997965e354555c09c49b801dfd6c126449f379db6ba77a6903d448f52d593c52cc5728718d8a952951d0c7a08c7ec42b2c9aad21bc8108db8cfdc19b1c51d9361d7040970286154ef482323106f64002d0cc74c25bfd2100191558d6f4d6b28c50e33e0fbba0da76f4baa670bb250217c2bf6804b6181da67b0e72019d14a3169f3014d5bcf37a596bb3e94edf50540dcba648e253177289ebb93af6c63c6d5281735ea16f6032aacf98135c02dcea89d58e11bec8c3b77baeb337b1ddf537aeace12074a4c6c1dc483c670b9a2a84511619ec6427a30f674e25a5983ab5a5850c7823dac5bb2eb52c4298c94238f68450627510b8df5d270c396a376749684516c9bcbd9d5c740048a6d0999b1aeb367282ef2ea44f8682df083c746126952c8f336d64c96ba79a120180c94ad00ebc8c889309018e7edaed980480a594b80dadaac5aae617355745eaa56e3d4af6bdde5b4dd5329537f4dd64218d0c60c591a893e58cd6fcd14bc1f6ca285d23c51c49d03077e2c12abd63e73e6fa833f03ae280b940ba10b11beea15df01b635a2a1f4b94f8d97c9857017c0ca862ff432f636735fa1170270ffa2b0ea52f422cfed3dbfb2e1e35accfeea3536fd94eb45cd97a335bf5509def24115ecd732cf9f11a8b05396f7d5078078d83af376e82af3ae7f06c1e1d7929dfaf3925355b0e7d8b52419737bb92a2b9a1aa6f6387bafec53e312ceb75e09e0c631d844eb8f2fd6fd8ca8292132470259033f06e6d11eb5706a996cff916f25cf9bcf54bb298bcf0b4c85a7975b79d265468ce842806a0c5fa39e572b3f2d545587255ff0d869af024320e0fae1e71caa6dee6c54adedbb321754657374636f696e00000000000000000000000000000000000000000000000041207265616c6c7920636f6f6c20636f696e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000009e572b3f2d545587255ff0d869af024320e0fae1e71caa6dee6c54adedbb321700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000db661ed91e173c91f64498d2ddb95acfc82f14048bf9e2725e185789bce93a30200000000000000940d0d422bbac84d7631d0caf3a0f50d3ab053d460a6225e079049f678e8a086807e5cf8758d69a61afabf6a478eb9d46245d2e4bd03ea23d26bf8e8331da30c' + +export const spend_2_output_6_mint_2_burn_1 = + '0202000000000000000600000000000000020000000000000001000000000000000100000000000000000000003d4b6d6a119119f2775a64db8c69bce1a9c19b7786d26ffbf47b4b11d27ad95ee0a20be7f57278e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110ce0a20be7f57278e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110cad6dec462f0e776289c0cb89ff344efebc255aa8971af4c7a89a557d3d98efaa2d77e00dcd55f9403f2268c1cfa156348563bbf9bf7f1d576e9098d41b96b5a9227c8462a91c4ee2bacdcb2368d65bd184cca5ed87f61d52ef116e788d456cef0f989d69632fff3be8ceb75439c7d310fa332edecbbd0a6145ad513086e5eaf15400eeb824685fa5efb0389aa8cbdbda91bd3dad85c79d2036d53ac824445dfab2e16b68ee8e4084dbcc1e9960ab0914b9c6c82ffb8362f280ba49c53c65ccc4e7c43fa19bdc934f6be5cf140705acea770062a43c5dc24e29a009605a8a845fbd6c43d21f777af45adb1e1472da099591737642abab182a1d7d24a1fd559e43780500004bbf0e3f2ead7c7aaf34c81fc5e89e0ec7b42d9ef45f9ae11218c332dcc0763600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0a20be7f57278e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110ca8a95853a6152a53d5b5a8491db0b2cab92c84b40d2db04738dc8be8f3563bb9a591745869247c69cd2407b85859ca8ba704ae7ad6e907824dcf4136a7579f36d6082c7f91db7080839bcc2a1612d41b0b6789a743ae4ba2a3fdfd4310cc95c210d9773cdaa143e286ef837566e33ce2cbb73b6227c98503520697f4b603ba0f786fa7b6653eca28fa9e8d8626b368c7a0100e0a198ad9b33640a57d246cab5f7b82c77f94209067f8d83e9f20ecd9dd01650d4f4880147207a359a6e083398e570be94161c04745558f0badac97607d7c016923dba282180b4efdb1c5e3fdb031f9898c96d1d037b2c26f6e9f0ddcb633a25a60f4019a7157bdc5f18c4c4e4a78050000db6eb7190e809707084b37ec5f0faa97f6799304c0d21ef30f36e35e520202f900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b99e8b273922ca8e0bb8a83e993e39d414ceef58f79c4864a56c0ec599e722cdceb3d4f18eab3e6f19365dcdf122bc159685fcf52d1bd16ad80eb9e3cd3fc208bd5b84ac72c0b698a091ed4a8f4ba9f886ebee44fbd46608f1fda785ffff80b614d2cd35affcd1137a637aefed866826c3a8aec2aac07f961bcb0957f9750750eb50f86adef21120d9121491665ff0c0807fda2ce96f0e414a4f860ee7eface8d59ee104155ba16659bd987cc642ee906c068981a2bdee6b985646d3b63c1b76a03b9f975b91b415bd92052b39dc528064f94c565a08739ee856afeaceded535a0014e1ff1f6f75ef377db821bbd93eaa53b3c941ee41e80be87d36c522c176a264ec714d655d80be0a4296db44b717c5334de7f283ab96e6548311776d5de3c399ef95d6753b5cafd68614db22ea6606744fa6e2fb7cb27928dfa7472bfa77a574bc8cd055b749148be813bd0b5d42bdd5595f755069368a245a1c11a24c79f874597847a1d2d4468bbf78e469b099f48f580aa17780630dee20c7db45bcbba1df1411c7e9dce47ce9d7310090d8fb58efee6e05b1492d039e7ec785b3f41d52ac68b0470dcdb23a372b031c2ba8a6ffc700c730531722ec39761eb1da7835deb44b83a8916d05ca0885de035c7599e1a0bdfd88626ee5d5168f634c39d043cc0516b61a4b8246f6cd3e2e6e35892baca134913f214046cfc6f31551c273d154cdc5d08d62fb7808977ccd9a5b1ab3db8577ff920b183d9211f663094adc1e22af81225923afe4a4f1090a22d6d71d3ebc944facc1080d5aa33e6cbbf6ead3095a8f149f5f43a61377c95b18de18347e1e4a249fb932c0a7b63dc53acd5145dfc4c8f501652a7bb178414c97da7a31660d1419edad0199f7032d7bc41892c63433ad100dec12a9bd46413159e1d7d6dd9675ab8dc85b88ca7fd15591e3a7ecf0664c2c872c1186c573ea994c47a6b9ed388d976722c93e96be80cc0f6a24df59bf3347e296ccacb211d7d9e9d9077713606003523e162938d966b4406f9386f8d7e6b4c3e6612ad35dba950b271b691d8f35b5ec50430979b7eacdff5b9b902768d90cc04b482363f12136cdfbd790616ed1681303674234be264c1bf8163971afcbae99ba46b47677866c0e80406785c5f0f122e4b058af30eba808cc37fe094901ebfcf2ebcb20c594e2ad5cf583a72ea665d6c759ae339fc617fc55d8261e5d48867dc0709524921a5677f3460772a1a2d4fa604a885455c6549651941f25a949865c757a3e41323be4f833fe4dce38ff0fb3affcf15727b4ab3a4d02aa42cabfae9b418d2637f950c4c474fa70b5c40a6b00d50f696e46e4652ac54f51d8963bb5eb4bf93c50a0a41cac7c722d41ad8a9bfeeea690b91901e8d1b2e25f46a5873de676c935219b1483108db3e39d4f6bcd6ecf041bfb10aed9189fe0acc29a8ed4d792318714904cfab00e4553295737f32d511e972af845eeecad89f18823f93cbf441baa4594c35b4685ca27b158755f0efafa66c5c31ec744c5287448843f3f614eaf00f2af121debc67340b8479b9c0b621f61c74490eaa4ff5730bf841cda0b2af3151ca99727dc75b608e0b60e945847e87e9e8c3969fc4a14a8915bddbfe06f3532c7a91bbf37eaf49b2c8a5baca716862dc60752c44a615a454a8ab3418010d1f840ddb4acafc32894c9c62c0273df22ed3585022db8cc8b5130898a0ac322d68201de0259d317289cbf627dc0b178edd8f397b3b164c8b21254c7711058081e2f13d56d838fda085af5cbea790870664f69c413bec3838e4ac1795727ed20a0eec3cef840d17c158506109a92607ea0111f59057c20403914bbf454657e324bac340245f0f871bdeb9af1c3bb822fe8928ac8657724f6625a5658798727b12f98c4004203f7e27c1b40a99e3942864d61d925368fa42abfc9bd21393a33cfb002f35bef3a77c1c52c06ed1d9451000486defbeb302e6bbd58bdbd3a816234611d6fbb0eb33833ce4c93e1c64380144eda4bf43cb98ad2b50f0fc19ce1e06a2fa58798513f7088197f94f07f64d573d7c86666f0c91eb8a5d10f18dc6f8efcf40e9accfa7160dc35f625d6cf449ec5d5608e346d4064df7276f7ee09a1cc587db9c847dbfc5e6d5e3216b96a703886413fd3a1480dc3cc8226d4512a8ab7609dea660d867029ce33e18c6d14a34dc43691f8ceff5a057d82d827a53b2ed98d55f1c0e5bc0397ff8ebe932eec142f7d41b4d5b9adc5986df442bc72e9fd94201c96cb35afdaedd981e48bffd4131a362f32a230487d562a70ac7e73968f6f6fc4da8ac2dd933fd89c6493143f042563325fd02c6489e3604f56fc4daa9c6f7702123732ed1976236e639386bf42527fdf14f0b1665b14bc59038011726d3c11695bb8c1b297ffbbe4c8812cd5365fe55580b6999f5f687fca1e7c1c2195bb2cbeda36d5b171d57b9d51bf90b2980ff76e8f41bb1fe3aad9cb97769cc50ef7513513324bdfbc7e0aa1c212dc03952873e3fe2fb92b0868cff1884a7b895e090ef3646bfe12e554c50b399883d404aa800f44837c2ddd6f394e545014725d2264437425ac8394e187d0366335750c6e014b6e3b783e7e48148483b1cf6a47b49b70c43f1ee3df1ffe59dc43105782221212f3d3ddc9d830bd28bddca26e136c78360ccbb465c77b3a3613999f6c8a09316d50b7af595f3fd030ce77ca62477391509e9055ac3d235bfad8676b51f697831dd4b6e159852d062b4f77215e0742c68d494ed438e77fd5ad89f6dc7cac095ba87def81667655f0884a93bd7562c74c58a1d5c03f89f37c01e1898d31d44e2c1ab30e6d353e60a12b9ce34b83eccdd898fd19a856508d0abeedfd8f2ad1b8a975c3a679df0d3c96f2b67d06f36b976bf062187880b8f70e20979c7bf5294a41e32d41fe230142bd04b12aa5ec8a5d86a6edccfeffdc15784fadff36763949239c57e2e0240de37aec9eeaa1ff5eee9d74a6100b61c410b2aab51ad8676b8ba49796c2c32ab95e60977e1ebeb4aecdf60d65a9ae1af788d40d2373235ebf7d14d154d9eb0bd2bc11db884013f910c50bbf1f8f33be8ea3a1faab91a0d940fa91c4bf0a780a9f51c8e0b986c1e50c4048b746f9f283add7df4117e81c653a06d0873ba704e2708fdf7f85a656b7b6fa447269db895d0c0d8117f8f74b7d8a80635c24d64d5fd5866a0a2b86858f88ab1219389c0e9c76d999a7ebdfedbc561e24194131943045a96f50293844e49abed53a7669b568dd50fce9cc7b1943852af43bcfe0a08f68b1fda352063d53c3c8b1a3af0e9eea0b259d1e7ef0fab767516c26b4094ffccabbf4badcaa6be316f11bceead3383555793a7f641c42f141ad49ebd6ea0eb5a77dc95bff683388410c16ed2a2575b606e88aa29d67079e31c56e288b5f42bebc7500923d58765d1994790152cf4dcd54bbed92a81fe020ba2e74f97d73f83ca5ff763df0d51500fa71887df1053b1d5e8394067b4b8d02263cce957b28499d417a81aa6bc9eaed7b259b8875fd74890fd63763f5d92cc4bd2c072f1ad659045186c347839b52c71a033affd2351c8dc30111a2fc2e5c3d0f4df2a5ae4d8077aff77d8911de9af8492bf665c328cbb63e4044760f4de518a0390fc814f050f8153b5f394a16159d030845ea021a8de09dae18bbaf7f84d77fa06ebd6a77fd7a58e4e3b61d3d7cca7f45aa09eb43c42f8e0b94783cd3d6d153dd670728c8b31d735ac68dd8ba4d5f5533f9804a8a3ea2bddc638d2b3e827878421c33efd4bce8295d1813724db9a3e64209c6d4f0b56eb78348612bdcd2446104935d6b7b4d634a1d81069a359aeae0a8d68b433328a6716fa865f2c8f9ebfadd937768ca1416f732b4683e3c80deb0a31721df6843763a18addf37745e043a49ed255addd7b1bfaf687feb03c3041ef41ac68cf2e79488817fddb2591014aff2b915d13a85bcbf358fd0b77eab81599ba13d61b47012334d5e9e8e0e1676f83ceafff38e21610a58a02d0e11e6d0a077d09cf3e77568594eff4dcf9a3d18b35c11bf8d5c135a288044b35b41d777ff2db7c1d422aab6cd031d072e66a64f65de63e0a7c1f65cd1ca081c90f02032373a20d05a5fac0c63246eb850d941d01cf6ee7ef4ad64a16f848bcffaa9f82bebea432eb41d73e9c3d2045e0a95f35749fc21072c80325544473426f58479a1f5fb6cf5f483715afb242fff7d10b7ae3f8bf5b97e6b95a441b9cd73d5038b9b5e19e4ed091afb430badfc8654965b89080308827526d4319374d167df69f4213d2c3f65ea863b75b7cc7912a72935096f7c66df78a707563a823eb4898a5dfe86f67b3f8d4d81f8af4fe4fe12a409272eb5ee02d9edf9b57ede80941a37ae5e47a9ac7929239e0e65dbcb0afc8e0a20be7f57278e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110c93f374b43bf10a21e54032ac63b9b79119e1efe4afaf545867a69a5775c69d482103cbd52d3ebecb264a4d98d3147cbc88c1a4418098446f72466e1060f86bdc216ddffc25ff9ef627256542028969fd2f0fa5aa5d2d9cf89c1efe4769fc2fe10f5cc9dd8f4495f1e376ce148f03d7421043d18c10728dbf8c3f80ff17a8dd59467e824f67bf62a2d695bcf7ad427a7c940a4b6109c7cef8de0d69a6f87e33f986341162fb9bf228a149b7971584155bfb9e787e4c29544ccaf7b7c70d74a4d78e52580849d7b5851c34ee8b67c9fb5a85c8cd2bff36140883755c5f2d05668d54657374636f696e00000000000000000000000000000000000000000000000041207265616c6c7920636f6f6c20636f696e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000008e52580849d7b5851c34ee8b67c9fb5a85c8cd2bff36140883755c5f2d05668d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0a20be7f57278e50d05f5f63b12663e29e2ebf4ce088d74e19a3cdb5195110c8e48070fade17150606e1154949f717e7ee317ec0d6b6f2c8922a9d65c3af10518d6a88344477c55732f7e7ea625f0ee9054f6a22b1550966b81a8dbc67b87f1601818dd67d12924696c9a3d19e5d454394951b9c81d1496bfb76f9c9d124db40a321f2fd7b83278cb76ff313ec2044bfec73b1606b82e67d69ea967704d8cd027a65203de39581076df6b9fb11f8bfd839a156c6ab4afd5a3643e600ef91df624a59839446903aeab89bfa2ba99897a1cc9a7339d0b407388c098e80792fc5e8e52580849d7b5851c34ee8b67c9fb5a85c8cd2bff36140883755c5f2d05668d4e657754657374636f696e00000000000000000000000000000000000000000041206e6577206f6e65207265616c6c7920636f6f6c20636f696e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000008e52580849d7b5851c34ee8b67c9fb5a85c8cd2bff36140883755c5f2d05668d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a9928954d4c98686796a2b214443b90fb8d44f5297006c80ffc336dc4f0c30dc0200000000000000cea785ae2b10384eba0f91f6dad392c1b07a7e099a9efe49a25ab38d43cd660d1ba4283a4ac95fb5504ad44ea8f723cb4745c2c713270c29cb84f65b6d41f903' diff --git a/tests_zemu/tests/standard.test.ts b/tests_zemu/tests/standard.test.ts index 98b2a5c..a53f21c 100644 --- a/tests_zemu/tests/standard.test.ts +++ b/tests_zemu/tests/standard.test.ts @@ -15,7 +15,7 @@ ******************************************************************************* */ import Zemu, { ButtonKind, zondaxMainmenuNavigation } from '@zondax/zemu' -import { PATH, defaultOptions, expectedKeys, models, spend_1_output_1, spend_1_output_4_mint_1_burn_1 } from './common' +import { PATH, defaultOptions, expectedKeys, models, spend_1_output_1, spend_1_output_4_mint_1_burn_1, spend_2_output_6_mint_2_burn_1 } from './common' import IronfishApp, { IronfishKeys, ResponseAddress, ResponseProofGenKey, ResponseViewKey } from '@zondax/ledger-ironfish' jest.setTimeout(45000) @@ -224,4 +224,33 @@ describe('Standard', function () { await sim.close() } }) + + test.concurrent.each(models)('blind-signing3', async function (m) { + const sim = new Zemu(m.path) + try { + await sim.start({ ...defaultOptions, model: m.name }) + const app = new IronfishApp(sim.getTransport()) + + const txBlob = Buffer.from(spend_2_output_6_mint_2_burn_1, 'hex') + const responsePublicAddress = await app.retrieveKeys(PATH, IronfishKeys.PublicAddress, false) + console.log(responsePublicAddress) + + // do not wait here.. we need to navigate + const signatureRequest = app.sign(PATH, txBlob) + + // Wait until we are not in the main menu + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-blind_sign3`) + + const signatureResponse = await signatureRequest + console.log(signatureResponse) + + console.log(signatureResponse.signatures?.length) + + expect(signatureResponse.returnCode).toEqual(0x9000) + expect(signatureResponse.errorMessage).toEqual('No errors') + } finally { + await sim.close() + } + }) })