diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f41aa1a..4c713fef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,22 +64,22 @@ jobs: command: | make - run: - name: Install node + yarn + name: Install node + yarn command: | - nvm install 12.16.2 - nvm use 12.16.2 + nvm install 14.4.0 + nvm use 14.4.0 npm install -g yarn - run: name: Build/Install build js deps command: | - nvm use 12.16.2 + nvm use 14.4.0 make zemu_install - run: name: Run zemu tests command: | - nvm use 12.16.2 + nvm use 14.4.0 make zemu_test - no_output_timeout: 30m + no_output_timeout: 20m build_package: docker: diff --git a/CMakeLists.txt b/CMakeLists.txt index 4daca0f8..12ff14ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,6 @@ file(GLOB_RECURSE LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/app/src/uint256.c ${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser.c ${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_impl.c - ${CMAKE_CURRENT_SOURCE_DIR}/app/src/coin.c ${CMAKE_CURRENT_SOURCE_DIR}/app/src/json/json_parser.c app/src/base32.c app/src/crypto.c diff --git a/app/Makefile b/app/Makefile index 3fe457d5..d31d3cbb 100755 --- a/app/Makefile +++ b/app/Makefile @@ -48,7 +48,7 @@ endif APPVERSION_M=0 APPVERSION_N=9 -APPVERSION_P=11 +APPVERSION_P=12 $(info COIN = [$(COIN)]) ifeq ($(COIN),FLOW) diff --git a/app/src/account.c b/app/src/account.c index 435e195a..dfcd34ef 100644 --- a/app/src/account.c +++ b/app/src/account.c @@ -14,7 +14,6 @@ * limitations under the License. ********************************************************************************/ #include "account.h" -#include "coin.h" #include "zxmacros.h" #include "stdbool.h" #include "apdu_codes.h" @@ -33,9 +32,6 @@ slot_store_t NV_CONST N_slot_store_impl __attribute__ ((aligned(64))); #define N_slot_store (*(NV_VOLATILE slot_store_t *)PIC(&N_slot_store_impl)) - - - uint8_t slot_is_empty(const account_slot_t *tmp) { return tmp->path.data[0] == 0; } @@ -76,7 +72,7 @@ zxerr_t slot_getItem(int8_t displayIdx, } case 1: { snprintf(outKey, outKeyLen, "Account"); - array_to_hexstr_with_0x(outVal, outValLen, tmp_slot.account.data, 8); + array_to_hexstr(outVal, outValLen, tmp_slot.account.data, 8); return zxerr_ok; } case 2: { @@ -100,7 +96,7 @@ zxerr_t slot_getItem(int8_t displayIdx, } case 1: { snprintf(outKey, outKeyLen, "Old Account"); - array_to_hexstr_with_0x(outVal, outValLen, oldSlot->account.data, 8); + array_to_hexstr(outVal, outValLen, oldSlot->account.data, 8); return zxerr_ok; } case 2: { @@ -112,7 +108,7 @@ zxerr_t slot_getItem(int8_t displayIdx, } case 3: { snprintf(outKey, outKeyLen, "New Account"); - array_to_hexstr_with_0x(outVal, outValLen, tmp_slot.account.data, 8); + array_to_hexstr(outVal, outValLen, tmp_slot.account.data, 8); return zxerr_ok; } case 4: { @@ -137,7 +133,7 @@ zxerr_t slot_getItem(int8_t displayIdx, } case 1: { snprintf(outKey, outKeyLen, "Old Account"); - array_to_hexstr_with_0x(outVal, outValLen, oldSlot->account.data, 8); + array_to_hexstr(outVal, outValLen, oldSlot->account.data, 8); return zxerr_ok; } case 2: { @@ -208,10 +204,13 @@ zxerr_t slot_parseSlot(uint8_t *buffer, uint16_t bufferLen) { return zxerr_out_of_bounds; } - //We copy account and path. Note that path is copied in app_main.c:extractHDPath (for sign transaction call). MEMCPY(&tmp_slot, buffer + 1, sizeof(account_slot_t)); - if (!path_is_mainnet(tmp_slot.path) && !path_is_testnet(tmp_slot.path) && !path_is_empty(tmp_slot.path)) { + const bool mainnet = tmp_slot.path.data[0] == HDPATH_0_DEFAULT && tmp_slot.path.data[1] == HDPATH_1_DEFAULT; + const bool testnet = tmp_slot.path.data[0] == HDPATH_0_TESTNET && tmp_slot.path.data[1] == HDPATH_1_TESTNET; + const bool empty = tmp_slot.path.data[0] == 0 && tmp_slot.path.data[1] == 0; + + if (!mainnet && !testnet && !empty) { array_to_hexstr(bufferUI, sizeof(bufferUI), tmp_slot.account.data, 8); zemu_log(bufferUI); zemu_log("\n"); @@ -224,27 +223,6 @@ zxerr_t slot_parseSlot(uint8_t *buffer, uint16_t bufferLen) { return zxerr_out_of_bounds; } - //account validation - if (!path_is_empty(tmp_slot.path)) { //no validation required if the new slot should be empty - uint64_t account = 0; - //LE <-> BE conversion necessary to validate account - for(int i=0; i -#include #include "coin.h" #include "zxerror.h" #include "zxmacros.h" #include "app_mode.h" #include "crypto.h" -#include "account.h" zxerr_t addr_getNumItems(uint8_t *num_items) { zemu_log_stack("addr_getNumItems"); + *num_items = 1; if (app_mode_expert()) { - *num_items = 4; - return zxerr_ok; + *num_items = 2; } - *num_items = 3; return zxerr_ok; } -//To add to zxlib after fork -__Z_INLINE void pageHexStringFromBuf(char *outValue, uint16_t outValueLen, - uint8_t *inValue, uint16_t inValueLen, - uint8_t pageIdx, uint8_t *pageCount) { - char buf[2*inValueLen+1]; - uint_fast32_t len = array_to_hexstr(buf, sizeof(buf), inValue, inValueLen); - if (len == 0) { - return; - } - pageString(outValue, outValueLen, buf, pageIdx, pageCount); -} - - zxerr_t addr_getItem(int8_t displayIdx, char *outKey, uint16_t outKeyLen, char *outVal, uint16_t outValLen, uint8_t pageIdx, uint8_t *pageCount) { zemu_log_stack("addr_getItem"); switch (displayIdx) { - case 0: { - snprintf(outKey, outKeyLen, "Account"); - array_to_hexstr_with_0x(outVal, outValLen, G_io_apdu_buffer, sizeof(flow_account_t)); - return zxerr_ok; - } - case 1: { + case 0: snprintf(outKey, outKeyLen, "Pub Key"); - pageHexStringFromBuf(outVal, outValLen, G_io_apdu_buffer + sizeof(flow_account_t), PUBLIC_KEY_LEN, pageIdx, pageCount); + // +2 is to skip 0x04 prefix that indicates uncompresed key + pageString(outVal, outValLen, (char *) (G_io_apdu_buffer + VIEW_ADDRESS_OFFSET_SECP256K1 + 2), pageIdx, pageCount); return zxerr_ok; - } - case 2: { - snprintf(outKey, outKeyLen, "Warning"); - pageString(outVal, outValLen, "Ledger does not check if the on-chain account includes the pub key!", pageIdx, pageCount); - return zxerr_ok; - } - case 3: { + case 1: { if (!app_mode_expert()) { return zxerr_no_data; } snprintf(outKey, outKeyLen, "Your Path"); char buffer[300]; - bip32_to_str(buffer, sizeof(buffer), hdPath.data, HDPATH_LEN_DEFAULT); + bip32_to_str(buffer, sizeof(buffer), hdPath, HDPATH_LEN_DEFAULT); pageString(outVal, outValLen, buffer, pageIdx, pageCount); return zxerr_ok; } diff --git a/app/src/apdu_handler.c b/app/src/apdu_handler.c index 8cb05f76..c1d94e6d 100644 --- a/app/src/apdu_handler.c +++ b/app/src/apdu_handler.c @@ -31,42 +31,12 @@ #include "zxmacros.h" __Z_INLINE void handleGetPubkey(volatile uint32_t *flags, volatile uint32_t *tx, uint32_t rx) { - if (rx != 6) { - THROW(APDU_CODE_DATA_INVALID); - } - - uint8_t displayAndConfirm = G_io_apdu_buffer[OFFSET_P1]; - const uint8_t slotIdx = G_io_apdu_buffer[OFFSET_DATA]; - - char buffer[20]; - snprintf(buffer, sizeof(buffer), "%d", slotIdx); - zemu_log_stack(buffer); - - account_slot_t slot; - zxerr_t err = slot_getSlot(slotIdx,(uint8_t *) &slot, sizeof(slot)); - snprintf(buffer, sizeof(buffer), "err: %d", err); - zemu_log_stack(buffer); - - if (err == zxerr_no_data) { - zemu_log_stack("Empty slot"); - THROW(APDU_CODE_DATA_INVALID); - } - if (err != zxerr_ok) { - THROW(APDU_CODE_EXECUTION_ERROR); - } - - MEMCPY(&hdPath, slot.path.data, sizeof(hdPath)); - - //We fill account and pubkey - MEMCPY(G_io_apdu_buffer, &slot.account, sizeof(slot.account)); + extractHDPath(rx, OFFSET_DATA); - *tx = sizeof(slot.account); - *tx += app_fill_pubkey(G_io_apdu_buffer + sizeof(slot.account), IO_APDU_BUFFER_SIZE - sizeof(slot.account)); + uint8_t requireConfirmation = G_io_apdu_buffer[OFFSET_P1]; - //Display or return the buffer - if (displayAndConfirm) { - //we set the returning length for app_reply_address - action_addr_len = *tx; + if (requireConfirmation) { + app_fill_address(); view_review_init(addr_getItem, addr_getNumItems, app_reply_address); view_review_show(); @@ -75,6 +45,7 @@ __Z_INLINE void handleGetPubkey(volatile uint32_t *flags, volatile uint32_t *tx, return; } + *tx = app_fill_address(); THROW(APDU_CODE_OK); } diff --git a/app/src/coin.c b/app/src/coin.c deleted file mode 100644 index 482ee384..00000000 --- a/app/src/coin.c +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* -* (c) 2019 Zondax GmbH -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -********************************************************************************/ - -#include "crypto.h" -// based on Dapper provided code at https://github.com/onflow/flow-go-sdk/blob/96796f0cabc1847d7879a5230ab55fd3cdd41ae8/address.go#L286 - -const uint16_t linearCodeN = 64; - -const uint32_t parityCheckMatrixColumns[] = { - 0x00001, 0x00002, 0x00004, 0x00008, - 0x00010, 0x00020, 0x00040, 0x00080, - 0x00100, 0x00200, 0x00400, 0x00800, - 0x01000, 0x02000, 0x04000, 0x08000, - 0x10000, 0x20000, 0x40000, 0x7328d, - 0x6689a, 0x6112f, 0x6084b, 0x433fd, - 0x42aab, 0x41951, 0x233ce, 0x22a81, - 0x21948, 0x1ef60, 0x1deca, 0x1c639, - 0x1bdd8, 0x1a535, 0x194ac, 0x18c46, - 0x1632b, 0x1529b, 0x14a43, 0x13184, - 0x12942, 0x118c1, 0x0f812, 0x0e027, - 0x0d00e, 0x0c83c, 0x0b01d, 0x0a831, - 0x0982b, 0x07034, 0x0682a, 0x05819, - 0x03807, 0x007d2, 0x00727, 0x0068e, - 0x0067c, 0x0059d, 0x004eb, 0x003b4, - 0x0036a, 0x002d9, 0x001c7, 0x0003f, -}; - -bool validateChainAddress(uint64_t chainCodeWord, uint64_t address) { - uint64_t codeWord = address ^chainCodeWord; - - if (codeWord == 0) { - return false; - } - - uint64_t parity = 0; - for (uint16_t i = 0; i < linearCodeN; i++) { - if ((codeWord & 1) == 1) { - parity ^= parityCheckMatrixColumns[i]; - } - codeWord >>= 1; - } - - return parity == 0; -} - diff --git a/app/src/coin.h b/app/src/coin.h index b5594658..f9e3940d 100644 --- a/app/src/coin.h +++ b/app/src/coin.h @@ -23,8 +23,6 @@ extern "C" { #include #include -#include -#include "zxmacros.h" #define HDPATH_LEN_DEFAULT 5 @@ -37,35 +35,14 @@ extern "C" { #define HDPATH_0_TESTNET (0x80000000u | 0x2cu) #define HDPATH_1_TESTNET (0x80000000u | 0x1u) -typedef struct { - uint32_t data[HDPATH_LEN_DEFAULT]; -} flow_path_t; - - -__Z_INLINE bool path_is_mainnet(const flow_path_t path) { - return (path.data[0] == HDPATH_0_DEFAULT && path.data[1] == HDPATH_1_DEFAULT); -} - -__Z_INLINE bool path_is_testnet(const flow_path_t path) { //or emulatornet - return (path.data[0] == HDPATH_0_TESTNET && path.data[1] == HDPATH_1_TESTNET); -} - -__Z_INLINE bool path_is_empty(const flow_path_t path) { - return path.data[0] == 0 && path.data[1] == 0; -} - -#define PUBLIC_KEY_LEN 65u +#define SECP256K1_PK_LEN 65u +#define SECP256R1_PK_LEN 65u typedef enum { ADDR_SECP256K1 = 0, } address_kind_e; -#define CODEWORD_MAINNET ((uint64_t) 0x0000000000000000) -#define CODEWORD_TESTNET ((uint64_t) 0x6834ba37b3980209) -#define CODEWORD_EMULATORNET ((uint64_t) 0x1cb159857af02018) - -bool validateChainAddress(uint64_t chainCodeWord, uint64_t address); - +#define VIEW_ADDRESS_OFFSET_SECP256K1 (SECP256K1_PK_LEN ) #define COIN_AMOUNT_DECIMAL_PLACES 0 // FIXME: Adjust this #define COIN_SUPPORTED_TX_VERSION 0 diff --git a/app/src/common/actions.h b/app/src/common/actions.h index e29616b3..357e212c 100644 --- a/app/src/common/actions.h +++ b/app/src/common/actions.h @@ -21,7 +21,6 @@ #include "apdu_codes.h" #include #include "coin.h" -#include "zxformat.h" extern uint16_t action_addr_len; @@ -30,7 +29,7 @@ __Z_INLINE void app_sign() { const uint16_t messageLength = get_signable_length(); uint16_t replyLen = 0; - zxerr_t err = crypto_sign(hdPath.data, message, messageLength, G_io_apdu_buffer, IO_APDU_BUFFER_SIZE - 3, &replyLen); + zxerr_t err = crypto_sign(hdPath, message, messageLength, G_io_apdu_buffer, IO_APDU_BUFFER_SIZE - 3, &replyLen); if (err != zxerr_ok || replyLen == 0) { set_code(G_io_apdu_buffer, 0, APDU_CODE_SIGN_VERIFY_ERROR); @@ -46,14 +45,18 @@ __Z_INLINE void app_reject() { io_exchange(CHANNEL_APDU | IO_RETURN_AFTER_TX, 2); } -__Z_INLINE uint8_t app_fill_pubkey(unsigned char *buffer, uint16_t buffer_len) { - zxerr_t err = crypto_extractPublicKey(&hdPath, buffer, buffer_len); +__Z_INLINE uint8_t app_fill_address() { + // Put data directly in the apdu buffer + MEMZERO(G_io_apdu_buffer, IO_APDU_BUFFER_SIZE); - if (err != zxerr_ok) { + action_addr_len = 0; + zxerr_t err = crypto_fillAddress(hdPath, G_io_apdu_buffer, IO_APDU_BUFFER_SIZE - 2, &action_addr_len); + + if (err != zxerr_ok || action_addr_len == 0) { THROW(APDU_CODE_EXECUTION_ERROR); } - return PUBLIC_KEY_LEN; + return action_addr_len; } __Z_INLINE void app_reply_address() { diff --git a/app/src/common/app_main.c b/app/src/common/app_main.c index b312956b..692a10c0 100644 --- a/app/src/common/app_main.c +++ b/app/src/common/app_main.c @@ -95,10 +95,15 @@ void extractHDPath(uint32_t rx, uint32_t offset) { THROW(APDU_CODE_WRONG_LENGTH); } - //HD path is extracted also in account.c:slot_parseSlot. - MEMCPY(&hdPath, G_io_apdu_buffer + offset, sizeof(uint32_t) * HDPATH_LEN_DEFAULT); + MEMCPY(hdPath, G_io_apdu_buffer + offset, sizeof(uint32_t) * HDPATH_LEN_DEFAULT); - if (!path_is_mainnet(hdPath) && !path_is_testnet(hdPath)) { + const bool mainnet = hdPath[0] == HDPATH_0_DEFAULT && + hdPath[1] == HDPATH_1_DEFAULT; + + const bool testnet = hdPath[0] == HDPATH_0_TESTNET && + hdPath[1] == HDPATH_1_TESTNET; + + if (!mainnet && !testnet) { THROW(APDU_CODE_DATA_INVALID); } } diff --git a/app/src/crypto.c b/app/src/crypto.c index 6b72a4f7..3bdf8fc6 100644 --- a/app/src/crypto.c +++ b/app/src/crypto.c @@ -18,7 +18,7 @@ #include "coin.h" #include "zxmacros.h" -flow_path_t hdPath; +uint32_t hdPath[HDPATH_LEN_DEFAULT]; #if defined(TARGET_NANOS) || defined(TARGET_NANOX) #include "cx.h" @@ -62,22 +62,23 @@ __Z_INLINE cx_curve_t get_cx_curve(const uint32_t path[HDPATH_LEN_DEFAULT]) { } } -zxerr_t crypto_extractPublicKey(const flow_path_t *path, uint8_t *pubKey, uint16_t pubKeyLen) { +zxerr_t crypto_extractPublicKey(const uint32_t path[HDPATH_LEN_DEFAULT], uint8_t *pubKey, uint16_t pubKeyLen) { zemu_log_stack("crypto_extractPublicKey"); MEMZERO(pubKey, pubKeyLen); - cx_curve_t curve = get_cx_curve(path->data); + cx_curve_t curve = get_cx_curve(path); if (curve!=CX_CURVE_SECP256K1 && curve!=CX_CURVE_SECP256R1 ) { zemu_log_stack("extractPublicKey: invalid_crypto_settings"); return zxerr_invalid_crypto_settings; } - if (pubKeyLen < PUBLIC_KEY_LEN) { + const uint32_t domainSize = 32; + const uint32_t pkSize = 1 + 2 * domainSize; + if (pubKeyLen < pkSize) { zemu_log_stack("extractPublicKey: zxerr_buffer_too_small"); return zxerr_buffer_too_small; } - cx_ecfp_public_key_t cx_publicKey; cx_ecfp_private_key_t cx_privateKey; uint8_t privateKeyData[32]; @@ -87,7 +88,7 @@ zxerr_t crypto_extractPublicKey(const flow_path_t *path, uint8_t *pubKey, uint16 TRY { zemu_log_stack("extractPublicKey: derive_node_bip32"); os_perso_derive_node_bip32(curve, - path->data, + path, HDPATH_LEN_DEFAULT, privateKeyData, NULL); @@ -100,12 +101,12 @@ zxerr_t crypto_extractPublicKey(const flow_path_t *path, uint8_t *pubKey, uint16 } FINALLY { MEMZERO(&cx_privateKey, sizeof(cx_privateKey)); - MEMZERO(privateKeyData, sizeof(privateKeyData)); + MEMZERO(privateKeyData, domainSize); } } END_TRY; - memcpy(pubKey, cx_publicKey.W, PUBLIC_KEY_LEN); + memcpy(pubKey, cx_publicKey.W, pkSize); return zxerr_ok; } @@ -226,4 +227,28 @@ zxerr_t crypto_sign(const uint32_t path[HDPATH_LEN_DEFAULT], const uint8_t *mess return zxerr_ok; } +typedef struct { + uint8_t publicKey[SECP256K1_PK_LEN]; + char addrStr[SECP256K1_PK_LEN*2]; + uint8_t padding[4]; +} __attribute__((packed)) answer_t; + +zxerr_t crypto_fillAddress(const uint32_t path[HDPATH_LEN_DEFAULT], uint8_t *buffer, uint16_t buffer_len, uint16_t *addrLen) { + MEMZERO(buffer, buffer_len); + + if (buffer_len < sizeof(answer_t)) { + zemu_log_stack("crypto_fillAddress: zxerr_buffer_too_small"); + return zxerr_buffer_too_small; + } + + answer_t *const answer = (answer_t *) buffer; + + CHECK_ZXERR(crypto_extractPublicKey(path, answer->publicKey, sizeof_field(answer_t, publicKey))); + + array_to_hexstr(answer->addrStr, sizeof_field(answer_t, addrStr) + 2, answer->publicKey, sizeof_field(answer_t, publicKey) ); + + *addrLen = sizeof(answer_t) - sizeof_field(answer_t, padding); + return zxerr_ok; +} + #endif diff --git a/app/src/crypto.h b/app/src/crypto.h index 09e0233d..a8952a03 100644 --- a/app/src/crypto.h +++ b/app/src/crypto.h @@ -45,9 +45,11 @@ typedef enum { void sha256(const uint8_t *message, uint16_t messageLen, uint8_t message_digest[CX_SHA256_SIZE]); -extern flow_path_t hdPath; +extern uint32_t hdPath[HDPATH_LEN_DEFAULT]; -zxerr_t crypto_extractPublicKey(const flow_path_t *path, uint8_t *pubKey, uint16_t pubKeyLen); +zxerr_t crypto_extractPublicKey(const uint32_t path[HDPATH_LEN_DEFAULT], uint8_t *pubKey, uint16_t pubKeyLen); + +zxerr_t crypto_fillAddress(const uint32_t path[HDPATH_LEN_DEFAULT], uint8_t *buffer, uint16_t bufferLen, uint16_t *addrLen); zxerr_t crypto_sign( const uint32_t path[HDPATH_LEN_DEFAULT], diff --git a/app/src/parser.c b/app/src/parser.c index 8afc39d4..08162c01 100644 --- a/app/src/parser.c +++ b/app/src/parser.c @@ -76,6 +76,50 @@ parser_error_t parser_getNumItems(const parser_context_t *ctx, uint8_t *num_item return PARSER_OK; } +// based on Dapper provided code at https://github.com/onflow/flow-go-sdk/blob/96796f0cabc1847d7879a5230ab55fd3cdd41ae8/address.go#L286 + +const uint16_t linearCodeN = 64; +const uint64_t codeword_mainnet = 0; +const uint64_t codeword_testnet = 0x6834ba37b3980209; +const uint64_t codeword_emulatornet = 0x1cb159857af02018; + +const uint32_t parityCheckMatrixColumns[] = { + 0x00001, 0x00002, 0x00004, 0x00008, + 0x00010, 0x00020, 0x00040, 0x00080, + 0x00100, 0x00200, 0x00400, 0x00800, + 0x01000, 0x02000, 0x04000, 0x08000, + 0x10000, 0x20000, 0x40000, 0x7328d, + 0x6689a, 0x6112f, 0x6084b, 0x433fd, + 0x42aab, 0x41951, 0x233ce, 0x22a81, + 0x21948, 0x1ef60, 0x1deca, 0x1c639, + 0x1bdd8, 0x1a535, 0x194ac, 0x18c46, + 0x1632b, 0x1529b, 0x14a43, 0x13184, + 0x12942, 0x118c1, 0x0f812, 0x0e027, + 0x0d00e, 0x0c83c, 0x0b01d, 0x0a831, + 0x0982b, 0x07034, 0x0682a, 0x05819, + 0x03807, 0x007d2, 0x00727, 0x0068e, + 0x0067c, 0x0059d, 0x004eb, 0x003b4, + 0x0036a, 0x002d9, 0x001c7, 0x0003f, +}; + +bool validateChainAddress(uint64_t chainCodeWord, uint64_t address) { + uint64_t codeWord = address ^chainCodeWord; + + if (codeWord == 0) { + return false; + } + + uint64_t parity = 0; + for (uint16_t i = 0; i < linearCodeN; i++) { + if ((codeWord & 1) == 1) { + parity ^= parityCheckMatrixColumns[i]; + } + codeWord >>= 1; + } + + return parity == 0; +} + parser_error_t chainIDFromPayer(const flow_payer_t *v, chain_id_e *chainID) { if (v->ctx.bufferLen != 8) { return PARSER_INVALID_ADDRESS; @@ -87,17 +131,17 @@ parser_error_t chainIDFromPayer(const flow_payer_t *v, chain_id_e *chainID) { address += v->ctx.buffer[i]; } - if (validateChainAddress(CODEWORD_MAINNET, address)) { + if (validateChainAddress(codeword_mainnet, address)) { *chainID = CHAIN_ID_MAINNET; return PARSER_OK; } - if (validateChainAddress(CODEWORD_TESTNET, address)) { + if (validateChainAddress(codeword_testnet, address)) { *chainID = CHAIN_ID_TESTNET; return PARSER_OK; } - if (validateChainAddress(CODEWORD_EMULATORNET, address)) { + if (validateChainAddress(codeword_emulatornet, address)) { *chainID = CHAIN_ID_EMULATOR; return PARSER_OK; } @@ -2721,9 +2765,9 @@ parser_error_t parser_getItemTransferFUSD(const parser_context_t *ctx, outVal, outValLen, pageIdx, pageCount); case 3: snprintf(outKey, outKeyLen, "Recipient"); - return parser_printArgumentString(&parser_tx_obj.arguments.argCtx[1], - outVal, outValLen, pageIdx, pageCount); - case 4: + return parser_printArgument(&parser_tx_obj.arguments, 1, + "Address", JSMN_STRING, + outVal, outValLen, pageIdx, pageCount); case 4: snprintf(outKey, outKeyLen, "Ref Block"); return parser_printBlockId(&parser_tx_obj.referenceBlockId, outVal, outValLen, pageIdx, pageCount); case 5: diff --git a/js/src/common.js b/js/src/common.js index 85f5baf8..97e3b39c 100644 --- a/js/src/common.js +++ b/js/src/common.js @@ -27,7 +27,6 @@ export const ERROR_CODE = { }; export const PKLEN = 65; -export const ADDRLEN = 8; const ERROR_DESCRIPTION = { 1: "U2F: Unknown", diff --git a/js/src/index.js b/js/src/index.js index f51c0035..9da8cc6d 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -26,7 +26,6 @@ import { P1_VALUES, PKLEN, processErrorResponse, - ADDRLEN, } from "./common"; function processGetAddrResponse(response) { @@ -35,9 +34,9 @@ function processGetAddrResponse(response) { const errorCodeData = partialResponse.slice(-2); const returnCode = errorCodeData[0] * 256 + errorCodeData[1]; - const address = Buffer.from(partialResponse.slice(0, ADDRLEN)).toString("hex"); - partialResponse = partialResponse.slice(ADDRLEN); - const publicKey = Buffer.from(partialResponse.slice(0, PKLEN)).toString("hex"); + const publicKey = Buffer.from(partialResponse.slice(0, PKLEN)); + partialResponse = partialResponse.slice(PKLEN); + const address = Buffer.from(partialResponse.slice(0, -2)).toString(); return { publicKey, @@ -155,30 +154,20 @@ export default class FlowApp { }, processErrorResponse); } - async getAddressAndPubKey(slotIdx) { - if (isNaN(slotIdx) || slotIdx < 0 || slotIdx > 63) { - return { - returnCode: 0, - errorMessage: "slotIdx should be a number between 0 and 63 inclusively", - }; - } - + async getAddressAndPubKey(path) { + const serializedPath = serializePathv1(path); + console.log(serializedPath); - const payload = Buffer.from([slotIdx]); - return this.transport.send(CLA, INS.GET_PUBKEY, P1_VALUES.ONLY_RETRIEVE, 0, payload, [0x9000]) + return this.transport + .send(CLA, INS.GET_PUBKEY, P1_VALUES.ONLY_RETRIEVE, 0, serializedPath, [0x9000]) .then(processGetAddrResponse, processErrorResponse); } - async showAddressAndPubKey(slotIdx) { - if (isNaN(slotIdx) || slotIdx < 0 || slotIdx > 63) { - return { - returnCode: 0, - errorMessage: "slotIdx should be a number between 0 and 63 inclusively", - }; - } + async showAddressAndPubKey(path) { + const serializedPath = serializePathv1(path); - const payload = Buffer.from([slotIdx]); - return this.transport.send(CLA, INS.GET_PUBKEY, P1_VALUES.SHOW_ADDRESS_IN_DEVICE, 0, payload, [0x9000]) + return this.transport + .send(CLA, INS.GET_PUBKEY, P1_VALUES.SHOW_ADDRESS_IN_DEVICE, 0, serializedPath, [0x9000]) .then(processGetAddrResponse, processErrorResponse); } @@ -238,6 +227,8 @@ export default class FlowApp { const payload = Buffer.from([slotIdx]); return this.transport.send(CLA, INS.GET_SLOT, 0, 0, payload).then((response) => { + console.log(response); + const errorCodeData = response.slice(-2); const returnCode = errorCodeData[0] * 256 + errorCodeData[1]; @@ -272,7 +263,12 @@ export default class FlowApp { }; } + console.log(serializedSlotIdx) + console.log(serializedAccount) + console.log(serializedPath) + const payload = Buffer.concat([ serializedSlotIdx, serializedAccount, serializedPath]); + console.log(payload) return this.transport.send(CLA, INS.SET_SLOT, 0, 0, payload).then((response) => { const errorCodeData = response.slice(-2); diff --git a/js/test/transactions.spec.js b/js/test/transactions.spec.js index 62651b92..236e8eed 100644 --- a/js/test/transactions.spec.js +++ b/js/test/transactions.spec.js @@ -77,9 +77,21 @@ function getKeyPath(sigAlgo, hashAlgo) { return path; } -async function transactionTest(app, path, publicKey, txHexBlob, txExpectedPageCount, sigAlgo, hashAlgo) { +async function transactionTest(txHexBlob, txExpectedPageCount, sigAlgo, hashAlgo) { + + const transport = await TransportNodeHid.create(); + + const app = new FlowApp(transport); + + const txBlob = Buffer.from(txHexBlob, "hex"); + const path = getKeyPath(sigAlgo.code, hashAlgo.code); + + const pkResponse = await app.getAddressAndPubKey(path); + expect(pkResponse.returnCode).equal(0x9000); + expect(pkResponse.errorMessage).equal("No errors"); + let resp = await app.sign(path, txBlob); expect(resp.returnCode).equal(0x9000); @@ -99,10 +111,12 @@ async function transactionTest(app, path, publicKey, txHexBlob, txExpectedPageCo // Verify transaction signature against the digest const ec = new EC(sigAlgo.name); const sig = resp.signatureDER.toString("hex"); - const pk = publicKey.toString("hex"); + const pk = pkResponse.publicKey.toString("hex"); const signatureOk = ec.verify(digest, sig, pk, 'hex'); expect(signatureOk).equal(true); + + await transport.close(); } const ECDSA_SECP256K1 = { name: "secp256k1", code: FlowApp.Signature.SECP256K1 }; @@ -114,65 +128,37 @@ const SHA3_256 = { name: "SHA3-256", code: FlowApp.Hash.SHA3_256}; const sigAlgos = [ECDSA_SECP256K1, ECDSA_P256]; const hashAlgos = [SHA2_256, SHA3_256]; -function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - describe("Staking transactions", () => { const transactions = JSON.parse(fs.readFileSync("../tests/testvectors/manifestEnvelopeCases.json")); //set of encodedTransactionEnvelope to test const to_test = new Set([ - "f9075cf90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4c0", + "f9029ef9029ab90226696d706f727420466c6f7749445461626c655374616b696e672066726f6d203078383632346235326639646463643034610a0a7472616e73616374696f6e286e6577416464726573733a20537472696e6729207b0a0a202020202f2f204c6f63616c207661726961626c6520666f722061207265666572656e636520746f20746865206e6f6465206f626a6563740a202020206c6574207374616b65725265663a2026466c6f7749445461626c655374616b696e672e4e6f64655374616b65720a0a202020207072657061726528616363743a20417574684163636f756e7429207b0a20202020202020202f2f20626f72726f772061207265666572656e636520746f20746865206e6f6465206f626a6563740a202020202020202073656c662e7374616b6572526566203d20616363742e626f72726f773c26466c6f7749445461626c655374616b696e672e4e6f64655374616b65723e2866726f6d3a20466c6f7749445461626c655374616b696e672e4e6f64655374616b657253746f7261676550617468290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f207374616b696e672061646d696e22290a202020207d0a0a2020202065786563757465207b0a0a202020202020202073656c662e7374616b65725265662e7570646174654e6574776f726b696e6741646472657373286e657741646472657373290a0a202020207d0a7df0af7b2274797065223a22537472696e67222c2276616c7565223a22666c6f772d6e6f64652e746573743a33353639227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4c0", + "f90343f9033fb9026c696d706f727420466c6f775374616b696e67436f6c6c656374696f6e2066726f6d203078386430653837623635313539616536330a0a2f2f2f204368616e67657320746865206e6574776f726b696e67206164647265737320666f722074686520737065636966696564206e6f64650a0a7472616e73616374696f6e286e6f646549443a20537472696e672c206e6577416464726573733a20537472696e6729207b0a202020200a202020206c6574207374616b696e67436f6c6c656374696f6e5265663a2026466c6f775374616b696e67436f6c6c656374696f6e2e5374616b696e67436f6c6c656374696f6e0a0a2020202070726570617265286163636f756e743a20417574684163636f756e7429207b0a202020202020202073656c662e7374616b696e67436f6c6c656374696f6e526566203d206163636f756e742e626f72726f773c26466c6f775374616b696e67436f6c6c656374696f6e2e5374616b696e67436f6c6c656374696f6e3e2866726f6d3a20466c6f775374616b696e67436f6c6c656374696f6e2e5374616b696e67436f6c6c656374696f6e53746f7261676550617468290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f772072656620746f205374616b696e67436f6c6c656374696f6e22290a202020207d0a0a2020202065786563757465207b0a202020202020202073656c662e7374616b696e67436f6c6c656374696f6e5265662e7570646174654e6574776f726b696e6741646472657373286e6f646549443a206e6f646549442c206e6577416464726573733a206e657741646472657373290a202020207d0a7d0af88eb85c7b2274797065223a22537472696e67222c2276616c7565223a2238383534393333356531646237623562343663326164353864646237306237613435653737306363356665373739363530626132366631306536626165356536227daf7b2274797065223a22537472696e67222c2276616c7565223a22666c6f772d6e6f64652e746573743a33353639227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4c0" ]); - test(`sign transaction`, async () => { - const transport = await TransportNodeHid.create(); - const app = new FlowApp(transport); - - const sigAlgo = ECDSA_P256; - const hashAlgo = SHA3_256; - - const path = getKeyPath(sigAlgo.code, hashAlgo.code); - console.log(path) - - const res1 = await app.setSlot(5, "e467b9dd11fa00df", path) - console.log(res1) - expect(res1.returnCode).equal(0x9000) - - const res2 = await app.getAddressAndPubKey(5) - console.log(res2) - expect(res2.returnCode).equal(0x9000) - expect(res2.errorMessage).equal("No errors"); - - for(const tx of transactions.filter((tx) => to_test.has(tx.encodedTransactionEnvelopeHex))) { - console.log("${tx.title} - ${ECDSA_P256.name} / ${SHA3_256.name}") - const txExpectedPageCount = getTransactionPageCount(tx.envelopeMessage); - - await transactionTest( - app, - path, - res2.publicKey, - tx.encodedTransactionEnvelopeHex, - txExpectedPageCount, - sigAlgo, - hashAlgo - ); - } - - await transport.close(); - }, 1000000); - + transactions + .filter((tx) => to_test.has(tx.encodedTransactionEnvelopeHex)) + .forEach((tx) => { + test(`sign transaction (${tx.title}) - ${ECDSA_P256.name} / ${SHA3_256.name}`, async () => { + const txExpectedPageCount = getTransactionPageCount(tx.envelopeMessage); + + await transactionTest( + tx.encodedTransactionEnvelopeHex, + txExpectedPageCount, + ECDSA_P256, + SHA3_256, + ); + }); + }, 100000); }); describe("Show address", () => { test("Test", async () => { const transport = await TransportNodeHid.create(); const app = new FlowApp(transport); - const res1 = await app.setSlot(0, "e467b9dd11fa00df", "m/44\'/539\'/512\'/0/0") - console.log(res1) - const res2 = await app.showAddressAndPubKey(0) - console.log(res2) + const res = await app.showAddressAndPubKey("m/44\'/539\'/512\'/0/0") + console.log(res) }) }) diff --git a/tests/generate-transaction-tests/manifest.mainnet.json b/tests/generate-transaction-tests/manifest.mainnet.json index 3020fa9e..f74336f3 100644 --- a/tests/generate-transaction-tests/manifest.mainnet.json +++ b/tests/generate-transaction-tests/manifest.mainnet.json @@ -1195,7 +1195,7 @@ "label": "Recipient", "sampleValues": [ { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ] diff --git a/tests/generate-transaction-tests/manifest.testnet.json b/tests/generate-transaction-tests/manifest.testnet.json index 3e8ae4e3..f1a8f727 100644 --- a/tests/generate-transaction-tests/manifest.testnet.json +++ b/tests/generate-transaction-tests/manifest.testnet.json @@ -1195,7 +1195,7 @@ "label": "Recipient", "sampleValues": [ { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ] diff --git a/tests/testvectors.cpp b/tests/testvectors.cpp index 433a0bbf..9f76f79a 100644 --- a/tests/testvectors.cpp +++ b/tests/testvectors.cpp @@ -34,12 +34,12 @@ void check_testcase(const testcase_t &testcase) { parser_error_t err; // Define mainnet or testnet through derivation path - hdPath.data[0] = HDPATH_0_DEFAULT; - hdPath.data[1] = HDPATH_1_DEFAULT; + hdPath[0] = HDPATH_0_DEFAULT; + hdPath[1] = HDPATH_1_DEFAULT; if (tc.chainID == "Testnet" || tc.chainID == "Emulator") { - hdPath.data[0] = HDPATH_0_TESTNET; - hdPath.data[1] = HDPATH_1_TESTNET; + hdPath[0] = HDPATH_0_TESTNET; + hdPath[1] = HDPATH_1_TESTNET; } app_mode_set_expert(tc.expert); diff --git a/tests/testvectors/manifestEnvelopeCases.json b/tests/testvectors/manifestEnvelopeCases.json index c0ff98d1..9c65efd1 100644 --- a/tests/testvectors/manifestEnvelopeCases.json +++ b/tests/testvectors/manifestEnvelopeCases.json @@ -3289,7 +3289,7 @@ "value": "92233720368.54775808" }, { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ], @@ -3320,7 +3320,7 @@ "value": "92233720368.54775808" }, { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ], @@ -3337,8 +3337,8 @@ ], "payloadSigs": [] }, - "encodedTransactionPayloadHex": "f90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078396130373636643933623636303862370a696d706f727420465553442066726f6d203078653232336438613632396534396336380a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8899a8ac2c71d4f6bd040a8899a8ac2c71d4f6bdc98899a8ac2c71d4f6bd", - "encodedTransactionEnvelopeHex": "f9075cf90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078396130373636643933623636303862370a696d706f727420465553442066726f6d203078653232336438613632396534396336380a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8899a8ac2c71d4f6bd040a8899a8ac2c71d4f6bdc98899a8ac2c71d4f6bdc0" + "encodedTransactionPayloadHex": "f90759b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078396130373636643933623636303862370a696d706f727420465553442066726f6d203078653232336438613632396534396336380a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af861b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227daf7b2274797065223a2241646472657373222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8899a8ac2c71d4f6bd040a8899a8ac2c71d4f6bdc98899a8ac2c71d4f6bd", + "encodedTransactionEnvelopeHex": "f9075df90759b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078396130373636643933623636303862370a696d706f727420465553442066726f6d203078653232336438613632396534396336380a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af861b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227daf7b2274797065223a2241646472657373222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8899a8ac2c71d4f6bd040a8899a8ac2c71d4f6bdc98899a8ac2c71d4f6bdc0" }, { "title": "TS.01 - Set up Top Shot Collection", @@ -6738,7 +6738,7 @@ "value": "92233720368.54775808" }, { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ], @@ -6769,7 +6769,7 @@ "value": "92233720368.54775808" }, { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ], @@ -6786,8 +6786,8 @@ ], "payloadSigs": [] }, - "encodedTransactionPayloadHex": "f90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4", - "encodedTransactionEnvelopeHex": "f9075cf90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4c0" + "encodedTransactionPayloadHex": "f90759b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af861b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227daf7b2274797065223a2241646472657373222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4", + "encodedTransactionEnvelopeHex": "f9075df90759b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af861b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227daf7b2274797065223a2241646472657373222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4c0" }, { "title": "TS.01 - Set up Top Shot Collection", diff --git a/tests/testvectors/manifestPayloadCases.json b/tests/testvectors/manifestPayloadCases.json index 1214fc1f..49ef5e78 100644 --- a/tests/testvectors/manifestPayloadCases.json +++ b/tests/testvectors/manifestPayloadCases.json @@ -2953,7 +2953,7 @@ "value": "92233720368.54775808" }, { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ], @@ -2977,7 +2977,7 @@ "value": "92233720368.54775808" }, { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ], @@ -2994,8 +2994,8 @@ ], "payloadSigs": [] }, - "encodedTransactionPayloadHex": "f90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078396130373636643933623636303862370a696d706f727420465553442066726f6d203078653232336438613632396534396336380a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8899a8ac2c71d4f6bd040a8899a8ac2c71d4f6bdc98899a8ac2c71d4f6bd", - "encodedTransactionEnvelopeHex": "f9075cf90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078396130373636643933623636303862370a696d706f727420465553442066726f6d203078653232336438613632396534396336380a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8899a8ac2c71d4f6bd040a8899a8ac2c71d4f6bdc98899a8ac2c71d4f6bdc0" + "encodedTransactionPayloadHex": "f90759b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078396130373636643933623636303862370a696d706f727420465553442066726f6d203078653232336438613632396534396336380a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af861b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227daf7b2274797065223a2241646472657373222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8899a8ac2c71d4f6bd040a8899a8ac2c71d4f6bdc98899a8ac2c71d4f6bd", + "encodedTransactionEnvelopeHex": "f9075df90759b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078396130373636643933623636303862370a696d706f727420465553442066726f6d203078653232336438613632396534396336380a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af861b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227daf7b2274797065223a2241646472657373222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a8899a8ac2c71d4f6bd040a8899a8ac2c71d4f6bdc98899a8ac2c71d4f6bdc0" }, { "title": "TS.01 - Set up Top Shot Collection", @@ -6045,7 +6045,7 @@ "value": "92233720368.54775808" }, { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ], @@ -6069,7 +6069,7 @@ "value": "92233720368.54775808" }, { - "type": "String", + "type": "Address", "value": "0xe467b9dd11fa00df" } ], @@ -6086,8 +6086,8 @@ ], "payloadSigs": [] }, - "encodedTransactionPayloadHex": "f90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4", - "encodedTransactionEnvelopeHex": "f9075cf90758b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af860b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227dae7b2274797065223a22537472696e67222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4c0" + "encodedTransactionPayloadHex": "f90759b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af861b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227daf7b2274797065223a2241646472657373222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4", + "encodedTransactionEnvelopeHex": "f9075df90759b906b32f2f2054686973207472616e73616374696f6e2077697468647261777320465553442066726f6d20746865207369676e65722773206163636f756e7420616e64206465706f7369747320697420696e746f206120726563697069656e74206163636f756e742e200a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c2069662074686520726563697069656e7420646f6573206e6f74206861766520616e20465553442072656365697665722e200a2f2f204e6f2066756e647320617265207472616e73666572726564206f72206c6f737420696620746865207472616e73616374696f6e206661696c732e0a2f2f0a2f2f20506172616d65746572733a0a2f2f202d20616d6f756e743a2054686520616d6f756e74206f66204655534420746f207472616e736665722028652e672e2031302e30290a2f2f202d20746f3a2054686520726563697069656e74206163636f756e7420616464726573732e0a2f2f0a2f2f2054686973207472616e73616374696f6e2077696c6c206661696c20696620656974686572207468652073656e646572206f7220726563697069656e7420646f6573206e6f7420686176650a2f2f20616e2046555344207661756c742073746f72656420696e207468656972206163636f756e742e20546f20636865636b20696620616e206163636f756e74206861732061207661756c740a2f2f206f7220696e697469616c697a652061206e6577207661756c742c2075736520636865636b5f667573645f7661756c745f73657475702e63646320616e642073657475705f667573645f7661756c742e6364630a2f2f20726573706563746976656c792e0a0a696d706f72742046756e6769626c65546f6b656e2066726f6d203078663233336463656538386665306162650a696d706f727420465553442066726f6d203078336335393539623536383839363339330a0a7472616e73616374696f6e28616d6f756e743a205546697836342c20746f3a204164647265737329207b0a0a202020202f2f20546865205661756c74207265736f75726365207468617420686f6c64732074686520746f6b656e73207468617420617265206265696e67207472616e736665727265640a202020206c65742073656e745661756c743a204046756e6769626c65546f6b656e2e5661756c740a0a2020202070726570617265287369676e65723a20417574684163636f756e7429207b0a20202020202020202f2f204765742061207265666572656e636520746f20746865207369676e657227732073746f726564207661756c740a20202020202020206c6574207661756c74526566203d207369676e65722e626f72726f773c26465553442e5661756c743e2866726f6d3a202f73746f726167652f667573645661756c74290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265666572656e636520746f20746865206f776e65722773205661756c742122290a0a20202020202020202f2f20576974686472617720746f6b656e732066726f6d20746865207369676e657227732073746f726564207661756c740a202020202020202073656c662e73656e745661756c74203c2d207661756c745265662e776974686472617728616d6f756e743a20616d6f756e74290a202020207d0a0a2020202065786563757465207b0a20202020202020202f2f204765742074686520726563697069656e742773207075626c6963206163636f756e74206f626a6563740a20202020202020206c657420726563697069656e74203d206765744163636f756e7428746f290a0a20202020202020202f2f204765742061207265666572656e636520746f2074686520726563697069656e7427732052656365697665720a20202020202020206c6574207265636569766572526566203d20726563697069656e742e6765744361706162696c697479282f7075626c69632f66757364526563656976657229212e626f72726f773c267b46756e6769626c65546f6b656e2e52656365697665727d3e28290a2020202020202020202020203f3f2070616e69632822436f756c64206e6f7420626f72726f77207265636569766572207265666572656e636520746f2074686520726563697069656e742773205661756c7422290a0a20202020202020202f2f204465706f736974207468652077697468647261776e20746f6b656e7320696e2074686520726563697069656e7427732072656365697665720a202020202020202072656365697665725265662e6465706f7369742866726f6d3a203c2d73656c662e73656e745661756c74290a202020207d0a7d0af861b07b2274797065223a22554669783634222c2276616c7565223a2239323233333732303336382e3534373735383038227daf7b2274797065223a2241646472657373222c2276616c7565223a22307865343637623964643131666130306466227da0f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b2a88f19c161bc24cf4b4040a88f19c161bc24cf4b4c988f19c161bc24cf4b4c0" }, { "title": "TS.01 - Set up Top Shot Collection", diff --git a/tests_zemu/package.json b/tests_zemu/package.json index 0685581d..513f6704 100644 --- a/tests_zemu/package.json +++ b/tests_zemu/package.json @@ -16,7 +16,7 @@ "zondax" ], "dependencies": { - "@onflow/ledger": "file:../js", + "@onflow/ledger": "0.1.0", "@zondax/zemu": "^0.7.0" }, "devDependencies": { diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-1-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-1-snap.png index a29dc08a..ca9ec8ae 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-1-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-1-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-2-snap.png index d317111a..8d37818b 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-2-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-2-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-3-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-3-snap.png index 173d5e8d..ce405a66 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-3-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-3-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-4-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-4-snap.png index 2c574d44..841d9a33 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-4-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-4-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-5-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-5-snap.png index 70836b82..29617172 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-5-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-5-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-6-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-6-snap.png index db7d0453..4aa28b6b 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-6-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-6-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-7-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-7-snap.png index e024f746..d764b119 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-7-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-7-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-8-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-8-snap.png deleted file mode 100644 index 29617172..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-8-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-1-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-1-snap.png index a29dc08a..ca9ec8ae 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-1-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-1-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-2-snap.png index d317111a..8d37818b 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-2-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-2-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-3-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-3-snap.png index 173d5e8d..ce405a66 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-3-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-3-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-4-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-4-snap.png index 2c574d44..841d9a33 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-4-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-4-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-5-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-5-snap.png index 70836b82..4aa28b6b 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-5-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-5-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-6-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-6-snap.png index db7d0453..d764b119 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-6-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-6-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-7-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-7-snap.png deleted file mode 100644 index e024f746..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-7-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-8-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-8-snap.png deleted file mode 100644 index 4aa28b6b..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-8-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-9-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-9-snap.png deleted file mode 100644 index d764b119..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-k-1-9-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-1-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-1-snap.png index a29dc08a..edc6571f 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-1-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-1-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-2-snap.png index 9699c96b..9167d744 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-2-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-2-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-3-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-3-snap.png index 5a888cb3..84dab4d6 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-3-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-3-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-4-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-4-snap.png index 477284c0..09c86fef 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-4-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-4-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-5-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-5-snap.png index 3c119731..4aa28b6b 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-5-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-5-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-6-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-6-snap.png index db7d0453..d764b119 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-6-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-6-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-7-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-7-snap.png deleted file mode 100644 index e024f746..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-7-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-8-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-8-snap.png deleted file mode 100644 index 4aa28b6b..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-8-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-9-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-9-snap.png deleted file mode 100644 index d764b119..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-secp-256-r-1-9-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-delete-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-delete-2-snap.png index 4415316c..a44bc277 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-delete-2-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-delete-2-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-full-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-full-2-snap.png index 5b1f3101..377a5aee 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-full-2-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-full-2-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-1-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-1-snap.png similarity index 100% rename from tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-1-snap.png rename to tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-1-snap.png diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-2-snap.png new file mode 100644 index 00000000..377a5aee Binary files /dev/null and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-2-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-3-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-3-snap.png similarity index 100% rename from tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-3-snap.png rename to tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-3-snap.png diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-9-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-4-snap.png similarity index 100% rename from tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-9-snap.png rename to tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-4-snap.png diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-10-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-5-snap.png similarity index 100% rename from tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-show-address-expert-10-snap.png rename to tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-5-snap.png diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-2-snap.png deleted file mode 100644 index 5b1f3101..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-2-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-4-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-4-snap.png deleted file mode 100644 index 4aa28b6b..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-4-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-5-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-5-snap.png deleted file mode 100644 index d764b119..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-mainnet-5-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-1-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-1-snap.png deleted file mode 100644 index 3e4f7ec1..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-1-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-2-snap.png deleted file mode 100644 index d052f95a..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-2-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-3-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-3-snap.png deleted file mode 100644 index 6d3222aa..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-3-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-4-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-4-snap.png deleted file mode 100644 index 4aa28b6b..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-4-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-5-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-5-snap.png deleted file mode 100644 index d764b119..00000000 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-set-testnet-5-snap.png and /dev/null differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-update-2-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-update-2-snap.png index 4415316c..a44bc277 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-update-2-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-update-2-snap.png differ diff --git a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-update-4-snap.png b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-update-4-snap.png index 7d06a6c7..7c247d1e 100644 Binary files a/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-update-4-snap.png and b/tests_zemu/tests/__image_snapshots__/basic-spec-js-basic-checks-slot-status-update-4-snap.png differ diff --git a/tests_zemu/tests/basic.spec.js b/tests_zemu/tests/basic.spec.js index af3f5f47..7770afe0 100644 --- a/tests_zemu/tests/basic.spec.js +++ b/tests_zemu/tests/basic.spec.js @@ -16,14 +16,12 @@ import { expect } from "jest"; import Zemu from "@zondax/zemu"; - import FlowApp from "@onflow/ledger"; - -import { APP_PATH, simOptions, verifyAndAccept, prepareSlot } from "./setup"; +import { APP_PATH, simOptions, verifyAndAccept } from "./setup"; describe("Basic checks", function () { - test("can start and stop container", async function () { + test("can start and stop container", async function () { const sim = new Zemu(APP_PATH); try { await sim.start(simOptions); @@ -60,9 +58,6 @@ describe("Basic checks", function () { const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; const path = `m/44'/539'/${scheme}'/0/0`; - const address = "e467b9dd11fa00df" - - await prepareSlot(sim, app, 1, address, path) let invalidMessage = Buffer.from( "1234567890", @@ -70,7 +65,7 @@ describe("Basic checks", function () { ); invalidMessage += "1"; - const pkResponse = await app.getAddressAndPubKey(1); + const pkResponse = await app.getAddressAndPubKey(path); console.log(pkResponse); expect(pkResponse.returnCode).toEqual(0x9000); expect(pkResponse.errorMessage).toEqual("No errors"); @@ -87,17 +82,18 @@ describe("Basic checks", function () { }); // accounts - test("slot status - set - mainnet", async function () { + + test("slot status - set", async function () { const sim = new Zemu(APP_PATH); try { await sim.start(simOptions); const app = new FlowApp(sim.getTransport()); - // Set slot 10, mainnet, valid address - const expectedAddress = "e467b9dd11fa00df" + // Set slot 10 + const expectedAccount = "0001020304050607" const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; const expectedPath = `m/44'/539'/${scheme}'/0/0`; - let respRequest = app.setSlot(10, expectedAddress, expectedPath); + let respRequest = app.setSlot(10, expectedAccount, expectedPath); // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); @@ -110,87 +106,36 @@ describe("Basic checks", function () { console.log(resp); expect(resp.returnCode).toEqual(0x9000); - // Set slot 10, mainnet, invalid address - const invalidAddress = "fd00fa11ddb967e4" - let respRequest2 = app.setSlot(10, invalidAddress, expectedPath); - const resp2 = await respRequest2; - console.log(resp2); - expect(resp2.returnCode).toEqual(0x6984); - } finally { await sim.close(); } }); - test("slot status - set - testnet", async function () { + test("slot status - update", async function () { const sim = new Zemu(APP_PATH); try { await sim.start(simOptions); const app = new FlowApp(sim.getTransport()); - // Set slot 10, testnet, valid address - const expectedAddress = "8c5303eaa26202d6" + // Set slot 10 + const expectedAccount = "0001020304050607" const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; - const expectedPath = `m/44'/1'/${scheme}'/0/0`; - let respRequest = app.setSlot(10, expectedAddress, expectedPath); + let expectedPath = `m/44'/539'/${scheme}'/0/0`; + let respRequest = app.setSlot(10, expectedAccount, expectedPath); // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); - // Now navigate the address / path - const snapshots = await verifyAndAccept(sim, 3); - snapshots.forEach((image) => expect(image).toMatchImageSnapshot()); - - const resp = await respRequest; - console.log(resp); - expect(resp.returnCode).toEqual(0x9000); - - // Set slot 10, testnet, invalid address - const invalidAddress = "d60262a2ea03538c" - let respRequest2 = app.setSlot(10, invalidAddress, expectedPath); - const resp2 = await respRequest2; - console.log(resp2); - expect(resp2.returnCode).toEqual(0x6984); - - } finally { - await sim.close(); - } - }); - - test("slot status - set - bad net", async function () { - const sim = new Zemu(APP_PATH); - try { - await sim.start(simOptions); - const app = new FlowApp(sim.getTransport()); - - const expectedAddress = "8c5303eaa26202d6" - const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; - const expectedPath = `m/44'/2'/${scheme}'/0/0`; - let respRequest = app.setSlot(10, expectedAddress, expectedPath); - const resp = await respRequest; - console.log(resp); - expect(resp.returnCode).toEqual(0x6984); - - } finally { - await sim.close(); - } - }); - - test("slot status - update", async function () { - const sim = new Zemu(APP_PATH); - try { - await sim.start(simOptions); - const app = new FlowApp(sim.getTransport()); + await sim.clickRight(); + await sim.clickRight(); + await sim.clickRight(); + await sim.clickBoth(); - // Set slot 10 - const expectedAddress = "e467b9dd11fa00df" - const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; - let expectedPath = `m/44'/539'/${scheme}'/0/0`; - let respRequest = await prepareSlot(sim, app, 10, expectedAddress, expectedPath); + resp = await respRequest; await Zemu.sleep(1000); expectedPath = `m/44'/539'/${scheme}'/0/1`; - respRequest = app.setSlot(10, expectedAddress, expectedPath); + respRequest = app.setSlot(10, expectedAccount, expectedPath); // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); @@ -215,10 +160,20 @@ describe("Basic checks", function () { const app = new FlowApp(sim.getTransport()); // Set slot 10 - const expectedAddress = "e467b9dd11fa00df" + const expectedAccount = "0001020304050607" const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; let expectedPath = `m/44'/539'/${scheme}'/0/0`; - let respRequest = prepareSlot(sim, app, 10, expectedAddress, expectedPath); + let respRequest = app.setSlot(10, expectedAccount, expectedPath); + + // Wait until we are not in the main menu + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); + + await sim.clickRight(); + await sim.clickRight(); + await sim.clickRight(); + await sim.clickBoth(); + + resp = await respRequest; await Zemu.sleep(1000); // Try to delete @@ -264,10 +219,10 @@ describe("Basic checks", function () { expect(respSlot.errorMessage).toEqual("Empty Buffer"); // Set slot 10 - const expectedAddress = "e467b9dd11fa00df" + const expectedAccount = "0001020304050607" const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; const expectedPath = `m/44'/539'/${scheme}'/0/0`; - let respSetRequest = app.setSlot(10, expectedAddress, expectedPath); + let respSetRequest = app.setSlot(10, expectedAccount, expectedPath); // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); @@ -294,7 +249,7 @@ describe("Basic checks", function () { let respGet2 = await app.getSlot(10); console.log(respGet2); expect(respGet2.returnCode).toEqual(0x9000); - expect(respGet2.account).toEqual(expectedAddress); + expect(respGet2.account).toEqual(expectedAccount); expect(respGet2.path).toEqual(expectedPath); } finally { @@ -312,18 +267,14 @@ describe("Basic checks", function () { const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; const path = `m/44'/539'/${scheme}'/0/0`; - const address = "e467b9dd11fa00df" - - await prepareSlot(sim, app, 0, address, path) - - const resp = await app.getAddressAndPubKey(0); + const resp = await app.getAddressAndPubKey(path); console.log(resp) expect(resp.returnCode).toEqual(0x9000); expect(resp.errorMessage).toEqual("No errors"); - const expected_address_string = "e467b9dd11fa00df"; + const expected_address_string = "04d7482bbaff7827035d5b238df318b10604673dc613808723efbd23fbc4b9fad34a415828d924ec7b83ac0eddf22ef115b7c203ee39fb080572d7e51775ee54be"; const expected_pk = "04d7482bbaff7827035d5b238df318b10604673dc613808723efbd23fbc4b9fad34a415828d924ec7b83ac0eddf22ef115b7c203ee39fb080572d7e51775ee54be"; expect(resp.address).toEqual(expected_address_string); @@ -343,20 +294,22 @@ describe("Basic checks", function () { // Derivation path. First 3 items are automatically hardened! const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; const path = `m/44'/539'/${scheme}'/0/0`; - const address = "e467b9dd11fa00df" - await prepareSlot(sim, app, 63, address, path) + const respRequest = app.showAddressAndPubKey(path); + // Wait until we are not in the main menu + await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); - const respRequest = app.showAddressAndPubKey(63); - const snapshots = await verifyAndAccept(sim, 7); + // Now navigate the address / path + const snapshots = await verifyAndAccept(sim, 4); snapshots.forEach((image) => expect(image).toMatchImageSnapshot()); - + const resp = await respRequest; + console.log(resp); expect(resp.returnCode).toEqual(0x9000); expect(resp.errorMessage).toEqual("No errors"); - const expected_address_string = "e467b9dd11fa00df"; + const expected_address_string = "04d7482bbaff7827035d5b238df318b10604673dc613808723efbd23fbc4b9fad34a415828d924ec7b83ac0eddf22ef115b7c203ee39fb080572d7e51775ee54be"; const expected_pk = "04d7482bbaff7827035d5b238df318b10604673dc613808723efbd23fbc4b9fad34a415828d924ec7b83ac0eddf22ef115b7c203ee39fb080572d7e51775ee54be"; expect(resp.address).toEqual(expected_address_string); @@ -376,16 +329,14 @@ describe("Basic checks", function () { const scheme = FlowApp.Signature.P256 | FlowApp.Hash.SHA2_256; const path = `m/44'/539'/${scheme}'/0/0`; - const address = "e467b9dd11fa00df" + const resp = await app.getAddressAndPubKey(path); - await prepareSlot(sim, app, 0, address, path) - - const resp = await app.getAddressAndPubKey(0); + console.log(resp) expect(resp.returnCode).toEqual(0x9000); expect(resp.errorMessage).toEqual("No errors"); - const expected_address_string = "e467b9dd11fa00df"; + const expected_address_string = "04db0a14364e5bf43a7ddda603522ddfee95c5ff12b48c49480f062e7aa9d20e84215eef9b8b76175f32802f75ed54110e29c7dc76054f24c028c312098e7177a3"; const expected_pk = "04db0a14364e5bf43a7ddda603522ddfee95c5ff12b48c49480f062e7aa9d20e84215eef9b8b76175f32802f75ed54110e29c7dc76054f24c028c312098e7177a3"; expect(resp.address).toEqual(expected_address_string); @@ -405,27 +356,22 @@ describe("Basic checks", function () { // Derivation path. First 3 items are automatically hardened! const scheme = FlowApp.Signature.P256 | FlowApp.Hash.SHA2_256; const path = `m/44'/539'/${scheme}'/0/0`; - const address = "e467b9dd11fa00df" - const fakepath = `m/44'/1'/${scheme}'/0/0`; - const fakeAddress = "8c5303eaa26202d6"; - await prepareSlot(sim, app, 1, address, path) - await prepareSlot(sim, app, 0, fakeAddress, fakepath) - - const respRequest = app.showAddressAndPubKey(1); + const respRequest = app.showAddressAndPubKey(path); // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); // Now navigate the address / path - const snapshots = await verifyAndAccept(sim, 7); + const snapshots = await verifyAndAccept(sim, 4); snapshots.forEach((image) => expect(image).toMatchImageSnapshot()); const resp = await respRequest; + console.log(resp); expect(resp.returnCode).toEqual(0x9000); expect(resp.errorMessage).toEqual("No errors"); - const expected_address_string = "e467b9dd11fa00df"; + const expected_address_string = "04db0a14364e5bf43a7ddda603522ddfee95c5ff12b48c49480f062e7aa9d20e84215eef9b8b76175f32802f75ed54110e29c7dc76054f24c028c312098e7177a3"; const expected_pk = "04db0a14364e5bf43a7ddda603522ddfee95c5ff12b48c49480f062e7aa9d20e84215eef9b8b76175f32802f75ed54110e29c7dc76054f24c028c312098e7177a3"; expect(resp.address).toEqual(expected_address_string); @@ -449,24 +395,22 @@ describe("Basic checks", function () { // Derivation path. First 3 items are automatically hardened! const scheme = FlowApp.Signature.SECP256K1 | FlowApp.Hash.SHA2_256; const path = `m/44'/539'/${scheme}'/0/0`; - const address = "e467b9dd11fa00df" - - await prepareSlot(sim, app, 1, address, path) - const respRequest = app.showAddressAndPubKey(1); + const respRequest = app.showAddressAndPubKey(path); // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); // Now navigate the address / path - const snapshots = await verifyAndAccept(sim, 8); + const snapshots = await verifyAndAccept(sim, 5); snapshots.forEach((image) => expect(image).toMatchImageSnapshot()); const resp = await respRequest; + console.log(resp); expect(resp.returnCode).toEqual(0x9000); expect(resp.errorMessage).toEqual("No errors"); - const expected_address_string = "e467b9dd11fa00df"; + const expected_address_string = "04d7482bbaff7827035d5b238df318b10604673dc613808723efbd23fbc4b9fad34a415828d924ec7b83ac0eddf22ef115b7c203ee39fb080572d7e51775ee54be"; const expected_pk = "04d7482bbaff7827035d5b238df318b10604673dc613808723efbd23fbc4b9fad34a415828d924ec7b83ac0eddf22ef115b7c203ee39fb080572d7e51775ee54be"; expect(resp.address).toEqual(expected_address_string); @@ -475,27 +419,4 @@ describe("Basic checks", function () { await sim.close(); } }); - - test("get address - empty slot", async function () { - const sim = new Zemu(APP_PATH); - try { - await sim.start(simOptions); - const app = new FlowApp(sim.getTransport()); - - const scheme = FlowApp.Signature.P256 | FlowApp.Hash.SHA2_256; - const path = `m/0/0/0/0/0`; - const address = "0000000000000000" - - await prepareSlot(sim, app, 0, address, path) - - const resp = await app.getAddressAndPubKey(0); - - console.log(resp); - - expect(resp.returnCode).toEqual(0x6984); - expect(resp.errorMessage).toEqual("Data is invalid"); - } finally { - await sim.close(); - } - }); }); diff --git a/tests_zemu/tests/setup.js b/tests_zemu/tests/setup.js index 82b1994b..1be7c518 100644 --- a/tests_zemu/tests/setup.js +++ b/tests_zemu/tests/setup.js @@ -24,7 +24,7 @@ export const APP_PATH = Resolve("../app/bin/app.elf"); const APP_SEED = "equip will roof matter pink blind book anxiety banner elbow sun young" export const simOptions = { - //logging: true, + // logging: true, start_delay: 1500, custom: `-s "${APP_SEED}"`, // X11: true, @@ -65,15 +65,3 @@ export async function verifyAndAccept(sim, pageCount) { return snapshots; } - -export async function prepareSlot(sim, app, slot, address = "0000000000000000", path = `m/0/0/0/0/0`) { - const respRequest = app.setSlot(slot, address, path); - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()); - await sim.clickRight(); - await sim.clickRight(); - await sim.clickRight(); - await sim.clickBoth(); - return await respRequest; -} - - diff --git a/tests_zemu/tests/transactions.spec.js b/tests_zemu/tests/transactions.spec.js index de52d610..27e44fe4 100644 --- a/tests_zemu/tests/transactions.spec.js +++ b/tests_zemu/tests/transactions.spec.js @@ -20,7 +20,7 @@ import jsSHA from "jssha"; import {ec as EC} from "elliptic"; import fs from "fs"; -import { APP_PATH, simOptions, verifyAndAccept, prepareSlot } from "./setup"; +import { APP_PATH, simOptions, verifyAndAccept } from "./setup"; const CHAIN_ID_PAGE_COUNT = 1; const REF_BLOCK_PAGE_COUNT = 2; @@ -88,10 +88,8 @@ async function transactionTest(txHexBlob, txExpectedPageCount, sigAlgo, hashAlgo const txBlob = Buffer.from(txHexBlob, "hex"); const path = getKeyPath(sigAlgo.code, hashAlgo.code); - const address = "e467b9dd11fa00df" - await prepareSlot(sim, app, 1, address, path) - const pkResponse = await app.getAddressAndPubKey(1); + const pkResponse = await app.getAddressAndPubKey(path); expect(pkResponse.returnCode).toEqual(0x9000); expect(pkResponse.errorMessage).toEqual("No errors"); diff --git a/tests_zemu/yarn.lock b/tests_zemu/yarn.lock index b0de508a..85f40465 100644 --- a/tests_zemu/yarn.lock +++ b/tests_zemu/yarn.lock @@ -758,14 +758,7 @@ pirates "^4.0.0" source-map-support "^0.5.16" -"@babel/runtime@^7.10.5": - version "7.15.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" - integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.11.2", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.10.5", "@babel/runtime@^7.11.2", "@babel/runtime@^7.8.4": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" dependencies: @@ -1114,25 +1107,10 @@ "@ledgerhq/logs" "^5.23.0" rxjs "^6.6.3" -"@ledgerhq/devices@^5.51.1": - version "5.51.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.51.1.tgz#d741a4a5d8f17c2f9d282fd27147e6fe1999edb7" - integrity sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA== - dependencies: - "@ledgerhq/errors" "^5.50.0" - "@ledgerhq/logs" "^5.50.0" - rxjs "6" - semver "^7.3.5" - "@ledgerhq/errors@^5.23.0": version "5.23.0" resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.23.0.tgz#30a0338dafba8264556011604abed08bf24979f3" -"@ledgerhq/errors@^5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.50.0.tgz#e3a6834cb8c19346efca214c1af84ed28e69dad9" - integrity sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow== - "@ledgerhq/hw-transport-http@^5.23.0": version "5.23.0" resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-http/-/hw-transport-http-5.23.0.tgz#9ad58820abef3b3233fe15d9a10ecd3791cf3ef3" @@ -1143,16 +1121,7 @@ axios "^0.19.0" ws "6" -"@ledgerhq/hw-transport@^5.19.1": - version "5.51.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz#8dd14a8e58cbee4df0c29eaeef983a79f5f22578" - integrity sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw== - dependencies: - "@ledgerhq/devices" "^5.51.1" - "@ledgerhq/errors" "^5.50.0" - events "^3.3.0" - -"@ledgerhq/hw-transport@^5.23.0": +"@ledgerhq/hw-transport@^5.19.1", "@ledgerhq/hw-transport@^5.23.0": version "5.23.0" resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.23.0.tgz#ed3445b9579c43a58cd959610ad7e464b36b87ca" dependencies: @@ -1164,11 +1133,6 @@ version "5.23.0" resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.23.0.tgz#7a86b1e6479c8aa8e8b9affe00eb8e369efdbc3b" -"@ledgerhq/logs@^5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.50.0.tgz#29c6419e8379d496ab6d0426eadf3c4d100cd186" - integrity sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA== - "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -1187,8 +1151,9 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@onflow/ledger@file:../js": +"@onflow/ledger@0.1.0": version "0.1.0" + resolved "https://registry.yarnpkg.com/@onflow/ledger/-/ledger-0.1.0.tgz#a309ebedbe685ec9a1f3bda1f60b2ceb716f36d2" dependencies: "@babel/runtime" "^7.10.5" "@ledgerhq/hw-transport" "^5.19.1" @@ -2557,11 +2522,6 @@ events@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" -events@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - exec-sh@^0.3.2: version "0.3.4" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" @@ -5256,13 +5216,6 @@ run-parallel@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" -rxjs@6: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - rxjs@^6.6.3: version "6.6.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" @@ -5327,13 +5280,6 @@ semver@^7.2.1, semver@^7.3.2: version "7.3.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" -semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"