diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 686ee4bb..e592b6e7 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -10,75 +10,20 @@ on: jobs: build_application: - strategy: - matrix: - sdk: - - path: $NANOS_SDK - name: nanos - - path: $NANOX_SDK - name: nanox - - path: $NANOSP_SDK - name: nanosp - - runs-on: ubuntu-latest - - container: - image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest - - steps: - - name: Clone - uses: actions/checkout@v3 - - - name: Build application - run: | - make BOLOS_SDK=${{ matrix.sdk.path }} DEBUG=1 - cp bin/app.elf bin/solana_${{ matrix.sdk.name }}.elf - - - name: Upload application binaries - uses: actions/upload-artifact@v3 - with: - name: solana_binaries - path: ./bin/solana_${{ matrix.sdk.name }}.elf - if-no-files-found: error - - job_scan_build: - name: Clang Static Analyzer - needs: build_application - runs-on: ubuntu-latest - container: - image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest - steps: - - uses: actions/checkout@v3 - - name: Build with Clang Static Analyzer - run: | - make clean - scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: scan-build - path: scan-build - - python_tests_nano: - name: NanoS Ragger tests + name: Build application using the reusable workflow + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 + with: + upload_app_binaries_artifact: compiled_app_binaries + run_for_devices: '["nanos", "nanox", "nanosp"]' + + ragger_tests: + name: Run ragger tests using the reusable workflow needs: build_application - runs-on: ubuntu-latest - steps: - - name: Clone - uses: actions/checkout@v3 - - name: Download all binaries - uses: actions/download-artifact@v3 - - name: Gather artifacts - run: | - mkdir tests/elfs - mv *_binaries/*.elf tests/elfs - - name: Install APT dependencies - run: sudo apt-get update && sudo apt-get install -y qemu-user-static - - name: Install Ragger - run: | - pip install --extra-index-url https://test.pypi.org/simple/ -r tests/python/requirements.txt - - name: Run tests - run: pytest tests/python/ -v --tb=short --device all + uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1 + with: + download_app_binaries_artifact: compiled_app_binaries + test_dir: tests/python + run_for_devices: '["nanos", "nanox", "nanosp"]' job_C_test: name: C tests diff --git a/.github/workflows/lint-workflow.yml b/.github/workflows/lint-workflow.yml index 6c1efb98..20715e25 100644 --- a/.github/workflows/lint-workflow.yml +++ b/.github/workflows/lint-workflow.yml @@ -45,4 +45,4 @@ jobs: # Use Config file when the github action supports it builtin: clear,rare check_filenames: true - skip: ./libsol,./tests + skip: ./libsol/printer_test.c,./tests/Cargo.lock diff --git a/.github/workflows/swap-ci-workflow.yml b/.github/workflows/swap-ci-workflow.yml new file mode 100644 index 00000000..6b6a6ed7 --- /dev/null +++ b/.github/workflows/swap-ci-workflow.yml @@ -0,0 +1,16 @@ +name: Swap functional tests + +on: + workflow_dispatch: + push: + branches: + - master + - develop + pull_request: + +jobs: + job_functional_tests: + uses: LedgerHQ/app-exchange/.github/workflows/reusable_swap_functional_tests.yml@develop + with: + branch_for_solana: ${{ github.ref }} + test_filter: '"SOL or sol or Solana or solana"' diff --git a/.gitignore b/.gitignore index 09fd410b..5e71a07f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,9 @@ +build bin debug dep obj dev-env -src/glyphs.c -src/glyphs.h .idea .vscode gitignore @@ -17,5 +16,4 @@ __pycache__ .pyc *~ -tests/elfs/ tests/python/snapshots-tmp/ diff --git a/Makefile b/Makefile index 5f443df2..ef5edd10 100644 --- a/Makefile +++ b/Makefile @@ -28,18 +28,18 @@ endif include $(BOLOS_SDK)/Makefile.defines -APP_LOAD_PARAMS = --curve ed25519 -ifeq ($(TARGET_NAME), TARGET_NANOX) - APP_LOAD_PARAMS += --appFlags 0x200 # APPLICATION_FLAG_BOLOS_SETTINGS +APP_LOAD_PARAMS = --curve ed25519 +ifeq ($(TARGET_NAME), TARGET_NANOS) +APP_LOAD_PARAMS += --appFlags 0x800 # APPLICATION_FLAG_LIBRARY else - APP_LOAD_PARAMS += --appFlags 0x000 +APP_LOAD_PARAMS += --appFlags 0xa00 # APPLICATION_FLAG_LIBRARY + APPLICATION_FLAG_BOLOS_SETTINGS endif APP_LOAD_PARAMS += --path "44'/501'" APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS) APPNAME = "Solana" APPVERSION_M = 1 -APPVERSION_N = 3 +APPVERSION_N = 4 APPVERSION_P = 1 APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" diff --git a/README.md b/README.md index 9f617419..5d144947 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ git clone --branch 1.0.3 --depth 1 https://github.com/LedgerHQ/nanosplus-secure- * Solana [system dependencies](https://github.com/solana-labs/solana/#1-install-rustc-cargo-and-rustfmt) ## Build -It is highly recommended that you read and understand the [Ledger App Builder](https://developers.ledger.com/docs/nano-app/build/) +It is highly recommended that you read and understand the [Ledger App Builder](https://developers.ledger.com/docs/embedded-app/build-app/#2-build-the-application) build process before proceeding. A convenience wrapper script (`./docker-make`) has been provided for simplicity `docker-make` manages the current target SDK for you, automatically setting `BOLOS_SDK` to the @@ -104,7 +104,7 @@ from clean and clean must be run _before_ switching ``` ## Working with the device -Requires that the `BOLOS_SDK` envvar [be set](https://developers.ledger.com/docs/nano-app/load/). +Requires that the `BOLOS_SDK` envvar [be set](https://developers.ledger.com/docs/embedded-app/build-app/#b-build-the-application). This can be achieved by first [building](#build) for the desired target device. ### Load ```bash diff --git a/doc/api.md b/doc/api.md index 4a4c2089..088a5b99 100644 --- a/doc/api.md +++ b/doc/api.md @@ -7,6 +7,7 @@ ## 1.3.0 - Add SIGN SOLANA OFF-CHAIN MESSAGE +- Add compatibility with the Exchange Application to SWAP, FUND, or SELL SOL tokens ## About diff --git a/libsol/message_test.c b/libsol/message_test.c index 8850813b..709e816d 100644 --- a/libsol/message_test.c +++ b/libsol/message_test.c @@ -6,7 +6,7 @@ #include #include -// Disable clang format for this file to keep clear buffer formating +// Disable clang format for this file to keep clear buffer formatting /* clang-format off */ void test_process_message_body_ok() { diff --git a/src/apdu.c b/src/apdu.c index 5ed1c88f..3432b357 100644 --- a/src/apdu.c +++ b/src/apdu.c @@ -193,4 +193,4 @@ int apdu_handle_message(const uint8_t* apdu_message, apdu_command->state = ApduStatePayloadComplete; return 0; -} \ No newline at end of file +} diff --git a/src/getPubkey.c b/src/getPubkey.c index 5cb6bb2c..e7de168b 100644 --- a/src/getPubkey.c +++ b/src/getPubkey.c @@ -28,14 +28,14 @@ UX_STEP_NOCB(ux_display_public_flow_5_step, }); UX_STEP_CB(ux_display_public_flow_6_step, pb, - sendResponse(set_result_get_pubkey(), true), + sendResponse(set_result_get_pubkey(), true, true), { &C_icon_validate_14, "Approve", }); UX_STEP_CB(ux_display_public_flow_7_step, pb, - sendResponse(0, false), + sendResponse(0, false, true), { &C_icon_crossmark, "Reject", diff --git a/src/globals.h b/src/globals.h index 727505ba..ee138595 100644 --- a/src/globals.h +++ b/src/globals.h @@ -52,6 +52,9 @@ typedef enum InstructionCode { InsSignOffchainMessage = 0x07 } InstructionCode; +extern volatile bool G_called_from_swap; +extern volatile bool G_swap_response_ready; + // display stepped screens extern unsigned int ux_step; extern unsigned int ux_step_count; @@ -84,4 +87,4 @@ typedef struct internalStorage_t { extern const internalStorage_t N_storage_real; #define N_storage (*(volatile internalStorage_t*) PIC(&N_storage_real)) -#endif \ No newline at end of file +#endif diff --git a/src/main.c b/src/main.c index 60c00aed..82341491 100644 --- a/src/main.c +++ b/src/main.c @@ -22,8 +22,16 @@ #include "apdu.h" #include "menu.h" +// Swap feature +#include "swap_lib_calls.h" +#include "handle_swap_sign_transaction.h" +#include "handle_get_printable_amount.h" +#include "handle_check_address.h" + ApduCommand G_command; unsigned char G_io_seproxyhal_spi_buffer[IO_SEPROXYHAL_BUFFER_SIZE_B]; +volatile bool G_called_from_swap; +volatile bool G_swap_response_ready; static void reset_main_globals(void) { MEMCLEAR(G_command); @@ -41,8 +49,10 @@ void handleApdu(volatile unsigned int *flags, volatile unsigned int *tx, int rx) const int ret = apdu_handle_message(G_io_apdu_buffer, rx, &G_command); if (ret != 0) { + MEMCLEAR(G_command); THROW(ret); } + if (G_command.state == ApduStatePayloadInProgress) { THROW(ApduReplySuccess); } @@ -96,7 +106,6 @@ void app_main(void) { // APDU injection faults. for (;;) { volatile unsigned short sw = 0; - BEGIN_TRY { TRY { rx = tx; @@ -105,6 +114,12 @@ void app_main(void) { rx = io_exchange(CHANNEL_APDU | flags, rx); flags = 0; + if (G_called_from_swap && G_swap_response_ready) { + PRINTF("Quitting app started in swap mode\n"); + // Quit app, we are in limited mode and our work is done + os_sched_exit(0); + } + // no apdu received, well, reset the session, and reset the // bootloader configuration if (rx == 0) { @@ -260,13 +275,8 @@ void nv_app_state_init() { } } -__attribute__((section(".boot"))) int main(void) { - // exit critical section - __asm volatile("cpsie i"); - - // ensure exception will work as planned - os_boot(); - +void coin_main(void) { + G_called_from_swap = false; for (;;) { UX_INIT(); @@ -307,5 +317,88 @@ __attribute__((section(".boot"))) int main(void) { END_TRY; } app_exit(); +} + +static void start_app_from_lib(void) { + G_called_from_swap = true; + G_swap_response_ready = false; + UX_INIT(); + io_seproxyhal_init(); + nv_app_state_init(); + USB_power(0); + USB_power(1); +#ifdef HAVE_BLE + // Erase globals that may inherit values from exchange + MEMCLEAR(G_io_asynch_ux_callback); + // grab the current plane mode setting + G_io_app.plane_mode = os_setting_get(OS_SETTING_PLANEMODE, NULL, 0); + BLE_power(0, NULL); + BLE_power(1, "Nano X"); +#endif // HAVE_BLE + app_main(); +} + +static void library_main_helper(libargs_t *args) { + check_api_level(CX_COMPAT_APILEVEL); + switch (args->command) { + case CHECK_ADDRESS: + // ensure result is zero if an exception is thrown + args->check_address->result = 0; + args->check_address->result = handle_check_address(args->check_address); + break; + case SIGN_TRANSACTION: + if (copy_transaction_parameters(args->create_transaction)) { + // never returns + start_app_from_lib(); + } + break; + case GET_PRINTABLE_AMOUNT: + handle_get_printable_amount(args->get_printable_amount); + break; + default: + break; + } +} + +static void library_main(libargs_t *args) { + volatile bool end = false; + /* This loop ensures that library_main_helper and os_lib_end are called + * within a try context, even if an exception is thrown */ + while (1) { + BEGIN_TRY { + TRY { + if (!end) { + library_main_helper(args); + } + os_lib_end(); + } + FINALLY { + end = true; + } + } + END_TRY; + } +} + +__attribute__((section(".boot"))) int main(int arg0) { + // exit critical section + __asm volatile("cpsie i"); + + // ensure exception will work as planned + os_boot(); + + if (arg0 == 0) { + // called from dashboard as standalone app + coin_main(); + } else { + // Called as library from another app + libargs_t *args = (libargs_t *) arg0; + if (args->id == 0x100) { + library_main(args); + } else { + app_exit(); + } + } + return 0; } diff --git a/src/signMessage.c b/src/signMessage.c index 2bc3d380..07318f9f 100644 --- a/src/signMessage.c +++ b/src/signMessage.c @@ -12,6 +12,8 @@ #include "globals.h" #include "apdu.h" +#include "handle_swap_sign_transaction.h" + static uint8_t set_result_sign_message() { uint8_t signature[SIGNATURE_LENGTH]; cx_ecfp_private_key_t privateKey; @@ -44,22 +46,18 @@ static uint8_t set_result_sign_message() { return SIGNATURE_LENGTH; } -static void send_result_sign_message(void) { - sendResponse(set_result_sign_message(), true); -} - ////////////////////////////////////////////////////////////////////// UX_STEP_CB(ux_approve_step, pb, - send_result_sign_message(), + sendResponse(set_result_sign_message(), true, true), { &C_icon_validate_14, "Approve", }); UX_STEP_CB(ux_reject_step, pb, - sendResponse(0, false), + sendResponse(0, false, true), { &C_icon_crossmark, "Reject", @@ -168,22 +166,74 @@ void handle_sign_message_parse_message(volatile unsigned int *tx) { } } +static bool check_swap_validity(const SummaryItemKind_t kinds[MAX_TRANSACTION_SUMMARY_ITEMS], + size_t num_summary_steps) { + bool amount_ok = false; + bool recipient_ok = false; + if (num_summary_steps != 2) { + PRINTF("2 steps expected for transaction in swap context, not %u\n", num_summary_steps); + return false; + } + for (size_t i = 0; i < num_summary_steps; ++i) { + transaction_summary_display_item(i, DisplayFlagNone | DisplayFlagLongPubkeys); + switch (kinds[i]) { + case SummaryItemAmount: + amount_ok = + check_swap_amount(G_transaction_summary_title, G_transaction_summary_text); + break; + case SummaryItemPubkey: + recipient_ok = + check_swap_recipient(G_transaction_summary_title, G_transaction_summary_text); + break; + default: + PRINTF("Refused kind '%u'\n", kinds[i]); + return false; + } + } + return amount_ok && recipient_ok; +} + void handle_sign_message_ui(volatile unsigned int *flags) { // Display the transaction summary SummaryItemKind_t summary_step_kinds[MAX_TRANSACTION_SUMMARY_ITEMS]; size_t num_summary_steps = 0; if (transaction_summary_finalize(summary_step_kinds, &num_summary_steps) == 0) { - size_t num_flow_steps = 0; + // If we are in swap context, do not redisplay the message data + // Instead, ensure they are identitical with what was previously displayed + if (G_called_from_swap) { + if (G_swap_response_ready) { + // Safety against trying to make the app sign multiple TX + // This code should never be triggered as the app is supposed to exit after + // sending the signed transaction + PRINTF("Safety against double signing triggered\n"); + os_sched_exit(-1); + } else { + // We will quit the app after this transaction, whether it succeeds or fails + PRINTF("Swap response is ready, the app will quit after the next send\n"); + G_swap_response_ready = true; + } + if (check_swap_validity(summary_step_kinds, num_summary_steps)) { + PRINTF("Valid swap transaction signed\n"); + sendResponse(set_result_sign_message(), true, false); + os_sched_exit(0); + } else { + PRINTF("Refused signing incorrect Swap transaction\n"); + THROW(ApduReplySolanaSummaryFinalizeFailed); + } + } else { + MEMCLEAR(flow_steps); + size_t num_flow_steps = 0; - for (size_t i = 0; i < num_summary_steps; i++) { - flow_steps[num_flow_steps++] = &ux_summary_step; - } + for (size_t i = 0; i < num_summary_steps; i++) { + flow_steps[num_flow_steps++] = &ux_summary_step; + } - flow_steps[num_flow_steps++] = &ux_approve_step; - flow_steps[num_flow_steps++] = &ux_reject_step; - flow_steps[num_flow_steps++] = FLOW_END_STEP; + flow_steps[num_flow_steps++] = &ux_approve_step; + flow_steps[num_flow_steps++] = &ux_reject_step; + flow_steps[num_flow_steps++] = FLOW_END_STEP; - ux_flow_init(0, flow_steps, NULL); + ux_flow_init(0, flow_steps, NULL); + } } else { THROW(ApduReplySolanaSummaryFinalizeFailed); } diff --git a/src/signOffchainMessage.c b/src/signOffchainMessage.c index 286930dd..ecc3f1bb 100644 --- a/src/signOffchainMessage.c +++ b/src/signOffchainMessage.c @@ -12,6 +12,9 @@ #include "globals.h" #include "apdu.h" +// Store locally the derived public key content +static Pubkey G_publicKey; + /** * Checks if data is in UTF-8 format. * Adapted from: https://www.cl.cam.ac.uk/~mgk25/ucs/utf8_check.c @@ -118,14 +121,14 @@ UX_STEP_NOCB(ux_sign_msg_text_step, }); UX_STEP_CB(ux_sign_msg_approve_step, pb, - sendResponse(set_result_sign_message(), true), + sendResponse(set_result_sign_message(), true, true), { &C_icon_validate_14, "Approve", }); UX_STEP_CB(ux_sign_msg_reject_step, pb, - sendResponse(0, false), + sendResponse(0, false, true), { &C_icon_crossmark, "Reject", @@ -221,11 +224,10 @@ void handle_sign_offchain_message(volatile unsigned int *flags, volatile unsigne summary_item_set_u64(transaction_summary_general_item(), "Size", header.length); summary_item_set_hash(transaction_summary_general_item(), "Hash", &G_command.message_hash); - Pubkey signer_pubkey; - get_public_key(signer_pubkey.data, + get_public_key(G_publicKey.data, G_command.derivation_path, G_command.derivation_path_length); - summary_item_set_pubkey(transaction_summary_general_item(), "Signer", &signer_pubkey); + summary_item_set_pubkey(transaction_summary_general_item(), "Signer", &G_publicKey); } else if (!is_ascii) { summary_item_set_hash(transaction_summary_general_item(), "Hash", &G_command.message_hash); } diff --git a/src/swap/handle_check_address.c b/src/swap/handle_check_address.c new file mode 100644 index 00000000..c777dcd1 --- /dev/null +++ b/src/swap/handle_check_address.c @@ -0,0 +1,73 @@ +#include + +#include "handle_check_address.h" +#include "os.h" +#include "utils.h" +#include "sol/printer.h" + +static int derive_public_key(const uint8_t *buffer, + uint16_t buffer_length, + uint8_t public_key[PUBKEY_LENGTH], + char public_key_str[BASE58_PUBKEY_LENGTH]) { + uint32_t derivation_path[MAX_BIP32_PATH_LENGTH]; + uint32_t path_length; + int ret; + + ret = read_derivation_path(buffer, buffer_length, derivation_path, &path_length) != 0; + if (ret != 0) { + return ret; + } + + get_public_key(public_key, derivation_path, path_length); + + return encode_base58(public_key, PUBKEY_LENGTH, public_key_str, BASE58_PUBKEY_LENGTH); +} + +int handle_check_address(const check_address_parameters_t *params) { + PRINTF("Inside Solana handle_check_address\n"); + PRINTF("Params on the address %d\n", (unsigned int) params); + + if (params->coin_configuration != NULL || params->coin_configuration_length != 0) { + PRINTF("No coin_configuration expected\n"); + return 0; + } + + if (params->address_parameters == NULL) { + PRINTF("derivation path expected\n"); + return 0; + } + + if (params->address_to_check == NULL) { + PRINTF("Address to check expected\n"); + return 0; + } + PRINTF("Address to check %s\n", params->address_to_check); + + if (params->extra_id_to_check == NULL) { + PRINTF("extra_id_to_check expected\n"); + return 0; + } else if (params->extra_id_to_check[0] != '\0') { + PRINTF("extra_id_to_check expected empty, not '%s'\n", params->extra_id_to_check); + return 0; + } + + uint8_t public_key[PUBKEY_LENGTH]; + char public_key_str[BASE58_PUBKEY_LENGTH]; + if (derive_public_key(params->address_parameters, + params->address_parameters_length, + public_key, + public_key_str) != 0) { + PRINTF("Failed to derive public key\n"); + return 0; + } + // Only public_key_str is useful in this context + UNUSED(public_key); + + if (strcmp(params->address_to_check, public_key_str) != 0) { + PRINTF("Address %s != %s\n", params->address_to_check, public_key_str); + return 0; + } + + PRINTF("Addresses match\n"); + return 1; +} diff --git a/src/swap/handle_check_address.h b/src/swap/handle_check_address.h new file mode 100644 index 00000000..5d148e63 --- /dev/null +++ b/src/swap/handle_check_address.h @@ -0,0 +1,5 @@ +#pragma once + +#include "swap_lib_calls.h" + +int handle_check_address(const check_address_parameters_t* params); diff --git a/src/swap/handle_get_printable_amount.c b/src/swap/handle_get_printable_amount.c new file mode 100644 index 00000000..7cf1a9ff --- /dev/null +++ b/src/swap/handle_get_printable_amount.c @@ -0,0 +1,33 @@ +#include "handle_get_printable_amount.h" +#include "swap_lib_calls.h" +#include "utils.h" +#include "sol/printer.h" + +/* return 0 on error, 1 otherwise */ +int handle_get_printable_amount(get_printable_amount_parameters_t* params) { + PRINTF("Inside Solana handle_get_printable_amount\n"); + MEMCLEAR(params->printable_amount); + + // Fees are displayed normally + // params->is_fee + + if (params->coin_configuration != NULL || params->coin_configuration_length != 0) { + PRINTF("No coin_configuration expected\n"); + return 0; + } + + uint64_t amount; + if (!swap_str_to_u64(params->amount, params->amount_length, &amount)) { + PRINTF("Amount is too big"); + return 0; + } + + if (print_amount(amount, params->printable_amount, sizeof(params->printable_amount)) != 0) { + PRINTF("print_amount failed"); + return 0; + } + + PRINTF("Amount %s\n", params->printable_amount); + + return 1; +} diff --git a/src/swap/handle_get_printable_amount.h b/src/swap/handle_get_printable_amount.h new file mode 100644 index 00000000..36481fdd --- /dev/null +++ b/src/swap/handle_get_printable_amount.h @@ -0,0 +1,5 @@ +#pragma once + +#include "swap_lib_calls.h" + +int handle_get_printable_amount(get_printable_amount_parameters_t* params); diff --git a/src/swap/handle_swap_sign_transaction.c b/src/swap/handle_swap_sign_transaction.c new file mode 100644 index 00000000..c90db59c --- /dev/null +++ b/src/swap/handle_swap_sign_transaction.c @@ -0,0 +1,104 @@ +#include "handle_swap_sign_transaction.h" +#include "utils.h" +#include "os.h" +#include "swap_lib_calls.h" +#include "sol/printer.h" + +typedef struct swap_validated_s { + bool initialized; + uint64_t amount; + char recipient[BASE58_PUBKEY_LENGTH]; +} swap_validated_t; + +static swap_validated_t G_swap_validated; + +// Save the data validated during the Exchange app flow +bool copy_transaction_parameters(const create_transaction_parameters_t *params) { + // Ensure no subcoin configuration + if (params->coin_configuration != NULL || params->coin_configuration_length != 0) { + PRINTF("No coin_configuration expected\n"); + return false; + } + + // Ensure no extraid + if (params->destination_address_extra_id == NULL) { + PRINTF("destination_address_extra_id expected\n"); + return false; + } else if (params->destination_address_extra_id[0] != '\0') { + PRINTF("destination_address_extra_id expected empty, not '%s'\n", + params->destination_address_extra_id); + return false; + } + + // first copy parameters to stack, and then to global data. + // We need this "trick" as the input data position can overlap with app globals + swap_validated_t swap_validated; + memset(&swap_validated, 0, sizeof(swap_validated)); + + // Save recipient + strlcpy(swap_validated.recipient, + params->destination_address, + sizeof(swap_validated.recipient)); + if (swap_validated.recipient[sizeof(swap_validated.recipient) - 1] != '\0') { + PRINTF("Address copy error\n"); + return false; + } + + // Save amount + if (!swap_str_to_u64(params->amount, params->amount_length, &swap_validated.amount)) { + return false; + } + + swap_validated.initialized = true; + + os_explicit_zero_BSS_segment(); + // Commit from stack to global data, params becomes tainted but we won't access it anymore + memcpy(&G_swap_validated, &swap_validated, sizeof(swap_validated)); + return true; +} + +// Check that the amount in parameter is the same as the previously saved amount +bool check_swap_amount(const char *title, const char *text) { + if (!G_swap_validated.initialized) { + return false; + } + + if (strcmp(title, "Transfer") != 0) { + PRINTF("Refused field '%s', expecting 'Transfer'\n", title); + return false; + } + + char validated_amount[MAX_PRINTABLE_AMOUNT_SIZE]; + if (print_amount(G_swap_validated.amount, validated_amount, sizeof(validated_amount)) != 0) { + PRINTF("Conversion failed\n"); + return false; + } + + if (strcmp(text, validated_amount) == 0) { + return true; + } else { + PRINTF("Amount requested in this transaction = %s\n", text); + PRINTF("Amount validated in swap = %s\n", validated_amount); + return false; + } +} + +// Check that the recipient in parameter is the same as the previously saved recipient +bool check_swap_recipient(const char *title, const char *text) { + if (!G_swap_validated.initialized) { + return false; + } + + if (strcmp(title, "Recipient") != 0) { + PRINTF("Refused field '%s', expecting 'Recipient'\n", title); + return false; + } + + if (strcmp(G_swap_validated.recipient, text) == 0) { + return true; + } else { + PRINTF("Recipient requested in this transaction = %s\n", text); + PRINTF("Recipient validated in swap = %s\n", G_swap_validated.recipient); + return false; + } +} diff --git a/src/swap/handle_swap_sign_transaction.h b/src/swap/handle_swap_sign_transaction.h new file mode 100644 index 00000000..60358c0f --- /dev/null +++ b/src/swap/handle_swap_sign_transaction.h @@ -0,0 +1,8 @@ +#pragma once + +#include "swap_lib_calls.h" + +bool copy_transaction_parameters(const create_transaction_parameters_t *sign_transaction_params); + +bool check_swap_amount(const char *title, const char *text); +bool check_swap_recipient(const char *title, const char *text); diff --git a/src/swap/swap_lib_calls.c b/src/swap/swap_lib_calls.c new file mode 100644 index 00000000..009a9bc5 --- /dev/null +++ b/src/swap/swap_lib_calls.c @@ -0,0 +1,16 @@ +#include + +#include "swap_lib_calls.h" + +bool swap_str_to_u64(const uint8_t* src, size_t length, uint64_t* result) { + if (length > sizeof(uint64_t)) { + return false; + } + uint64_t value = 0; + for (size_t i = 0; i < length; i++) { + value <<= 8; + value |= src[i]; + } + *result = value; + return true; +} diff --git a/src/swap/swap_lib_calls.h b/src/swap/swap_lib_calls.h new file mode 100644 index 00000000..27a4436a --- /dev/null +++ b/src/swap/swap_lib_calls.h @@ -0,0 +1,74 @@ +#pragma once + +#include +#include +#include + +#define RUN_APPLICATION 1 + +#define SIGN_TRANSACTION 2 + +#define CHECK_ADDRESS 3 + +#define GET_PRINTABLE_AMOUNT 4 + +/* + * Amounts are stored as bytes, with a max size of 16 (see protobuf + * specifications). Max 16B integer is 340282366920938463463374607431768211455 + * in decimal, which is a 32-long char string. + * The printable amount also contains spaces, the ticker symbol (with variable + * size, up to 12 in Ethereum for instance) and a terminating null byte, so 50 + * bytes total should be a fair maximum. + */ +#define MAX_PRINTABLE_AMOUNT_SIZE 50 + +// structure that should be send to specific coin application to get address +typedef struct check_address_parameters_s { + // IN + unsigned char *coin_configuration; + unsigned char coin_configuration_length; + // serialized path, segwit, version prefix, hash used, dictionary etc. + // fields and serialization format depends on specific coin app + unsigned char *address_parameters; + unsigned char address_parameters_length; + char *address_to_check; + char *extra_id_to_check; + // OUT + int result; +} check_address_parameters_t; + +// structure that should be send to specific coin application to get printable amount +typedef struct get_printable_amount_parameters_s { + // IN + unsigned char *coin_configuration; + unsigned char coin_configuration_length; + unsigned char *amount; + unsigned char amount_length; + bool is_fee; + // OUT + char printable_amount[MAX_PRINTABLE_AMOUNT_SIZE]; +} get_printable_amount_parameters_t; + +typedef struct create_transaction_parameters_s { + unsigned char *coin_configuration; + unsigned char coin_configuration_length; + unsigned char *amount; + unsigned char amount_length; + unsigned char *fee_amount; + unsigned char fee_amount_length; + char *destination_address; + char *destination_address_extra_id; +} create_transaction_parameters_t; + +bool swap_str_to_u64(const uint8_t *src, size_t length, uint64_t *result); + +typedef struct libargs_s { + unsigned int id; + unsigned int command; + unsigned int unused; + union { + check_address_parameters_t *check_address; + create_transaction_parameters_t *create_transaction; + get_printable_amount_parameters_t *get_printable_amount; + }; +} libargs_t; diff --git a/src/utils.c b/src/utils.c index 7ea9b056..91083309 100644 --- a/src/utils.c +++ b/src/utils.c @@ -126,13 +126,15 @@ int read_derivation_path(const uint8_t *data_buffer, return 0; } -void sendResponse(uint8_t tx, bool approve) { +void sendResponse(uint8_t tx, bool approve, bool display_menu) { G_io_apdu_buffer[tx++] = approve ? 0x90 : 0x69; G_io_apdu_buffer[tx++] = approve ? 0x00 : 0x85; // Send back the response, do not restart the event loop io_exchange(CHANNEL_APDU | IO_RETURN_AFTER_TX, tx); - // Display back the original UX - ui_idle(); + if (display_menu) { + // Display back the original UX + ui_idle(); + } } unsigned int ui_prepro(const bagl_element_t *element) { diff --git a/src/utils.h b/src/utils.h index af8f2889..a5c2ce56 100644 --- a/src/utils.h +++ b/src/utils.h @@ -53,7 +53,7 @@ int read_derivation_path(const uint8_t *data_buffer, uint32_t *derivation_path, uint32_t *derivation_path_length); -void sendResponse(uint8_t tx, bool approve); +void sendResponse(uint8_t tx, bool approve, bool display_menu); // type userid x y w h str rad fill fg bg fid iid txt // touchparams... ] diff --git a/tests/python/apps/solana.py b/tests/python/apps/solana.py index ca06561f..19e09420 100644 --- a/tests/python/apps/solana.py +++ b/tests/python/apps/solana.py @@ -2,8 +2,7 @@ from enum import IntEnum from contextlib import contextmanager -from ragger.backend import BackendInterface -from ragger.utils import RAPDU +from ragger.backend.interface import BackendInterface, RAPDU class INS(IntEnum): @@ -74,7 +73,7 @@ def _extend_and_serialize_multiple_derivations_paths(derivations_paths: List[byt class SolanaClient: client: BackendInterface - def __init__(self, client): + def __init__(self, client: BackendInterface): self._client = client @@ -86,6 +85,14 @@ def get_public_key(self, derivation_path: bytes) -> bytes: return public_key.data + @contextmanager + def send_public_key_with_confirm(self, derivation_path: bytes) -> bytes: + with self._client.exchange_async(CLA, INS.INS_GET_PUBKEY, + P1_CONFIRM, P2_NONE, + derivation_path): + yield + + def split_and_prefix_message(self, derivation_path : bytes, message: bytes) -> List[bytes]: assert len(message) <= 65535, "Message to send is too long" header: bytes = _extend_and_serialize_multiple_derivations_paths([derivation_path]) @@ -96,14 +103,15 @@ def split_and_prefix_message(self, derivation_path : bytes, message: bytes) -> L return [header + s for s in message_splited] - def send_first_message_batch(self, messages: List[bytes], p1: int) -> RAPDU: - self._client.exchange(CLA, INS.INS_SIGN_MESSAGE, p1, P2_MORE, messages[0]) + def send_first_message_batch(self, ins: INS, messages: List[bytes], p1: int) -> RAPDU: + self._client.exchange(CLA, ins, p1, P2_MORE, messages[0]) for m in messages[1:]: - self._client.exchange(CLA, INS.INS_SIGN_MESSAGE, p1, P2_MORE | P2_EXTEND, m) + self._client.exchange(CLA, ins, p1, P2_MORE | P2_EXTEND, m) @contextmanager - def send_async_sign_message(self, + def send_async_sign_request(self, + ins: INS, derivation_path : bytes, message: bytes) -> Generator[None, None, None]: message_splited_prefixed = self.split_and_prefix_message(derivation_path, message) @@ -112,35 +120,33 @@ def send_async_sign_message(self, # Send all chunks with P2_EXTEND except for the first chunk if len(message_splited_prefixed) > 1: final_p2 = P2_EXTEND - self.send_first_message_batch(message_splited_prefixed[:-1], P1_CONFIRM) + self.send_first_message_batch(ins, message_splited_prefixed[:-1], P1_CONFIRM) else: final_p2 = 0 with self._client.exchange_async(CLA, - INS.INS_SIGN_MESSAGE, + ins, P1_CONFIRM, final_p2, message_splited_prefixed[-1]): yield - def get_async_response(self) -> RAPDU: - return self._client.last_async_response + @contextmanager + def send_async_sign_message(self, + derivation_path : bytes, + message: bytes) -> Generator[None, None, None]: + with self.send_async_sign_request(INS.INS_SIGN_MESSAGE, derivation_path, message): + yield - def send_blind_sign_message(self, derivation_path : bytes, message: bytes) -> RAPDU: - message_splited_prefixed = self.split_and_prefix_message(derivation_path, message) + @contextmanager + def send_async_sign_offchain_message(self, + derivation_path : bytes, + message: bytes) -> Generator[None, None, None]: + with self.send_async_sign_request(INS.INS_SIGN_OFFCHAIN_MESSAGE, derivation_path, message): + yield - # Send all chunks with P2_MORE except for the last chunk - # Send all chunks with P2_EXTEND except for the first chunk - if len(message_splited_prefixed) > 1: - final_p2 |= P2_EXTEND - self.send_first_message_batch(message_splited_prefixed[:-1], P1_NON_CONFIRM) - else: - final_p2 = 0 - return self._client.exchange(CLA, - INS.INS_SIGN_MESSAGE, - P1_NON_CONFIRM, - final_p2, - message_splited_prefixed[-1]) + def get_async_response(self) -> RAPDU: + return self._client.last_async_response diff --git a/tests/python/apps/solana_cmd_builder.py b/tests/python/apps/solana_cmd_builder.py index 3051b7fb..8c0e1a39 100644 --- a/tests/python/apps/solana_cmd_builder.py +++ b/tests/python/apps/solana_cmd_builder.py @@ -115,3 +115,92 @@ def serialize(self) -> bytes: serialized += len(self.compiled_instructions).to_bytes(1, byteorder='little') serialized += self.compiled_instructions[0].serialize() return serialized + +def is_printable_ascii(string: str) -> bool: + try: + string.decode('ascii') + return True + except UnicodeDecodeError: + return False + +def is_utf8(string: str) -> bool: + return True + + +PACKET_DATA_SIZE: int = 1280 - 40 - 8 +U16_MAX = 2^16-1 + + +SIGNING_DOMAIN: bytes = b"\xffsolana offchain" +# // Header Length = Signing Domain (16) + Header Version (1) +BASE_HEADER_LEN: int = len(SIGNING_DOMAIN) + 1; + +# Header Length = Message Format (1) + Message Length (2) +MESSAGE_HEADER_LEN: int = 3; +# Max length of the OffchainMessage +MAX_LEN: int = U16_MAX - BASE_HEADER_LEN - MESSAGE_HEADER_LEN; +# Max Length of the OffchainMessage supported by the Ledger +MAX_LEN_LEDGER: int = PACKET_DATA_SIZE - BASE_HEADER_LEN - MESSAGE_HEADER_LEN; + +class MessageFormat(IntEnum): + RestrictedAscii = 0x00 + LimitedUtf8 = 0x01 + ExtendedUtf8 = 0x02 + +class v0_OffchainMessage: + format: MessageFormat + message: bytes + + def __init__(self, message: bytes): + # /// Construct a new OffchainMessage object from the given message + if len(message) <= MAX_LEN_LEDGER: + if is_printable_ascii(message): + self.format = MessageFormat.RestrictedAscii + elif is_utf8(message): + self.format = MessageFormat.LimitedUtf8 + else: + raise ValueError() + elif len(message) <= MAX_LEN: + if is_utf8(message): + self.format = MessageFormat.ExtendedUtf8 + else: + raise ValueError() + else: + raise ValueError() + self.message = message + + # Serialize the message to bytes, including the full header + def serialize(self) -> bytes: + # data.reserve(Self::HEADER_LEN.saturating_add(self.message.len())); + data: bytes = b"" + # format + data += self.format.to_bytes(1, byteorder='little') + # message length + data += len(self.message).to_bytes(2, byteorder='little') + # message + data += self.message + return data + + +class OffchainMessage: + version: int + message: v0_OffchainMessage + + # Construct a new OffchainMessage object from the given version and message + def __init__(self, version: int, message: bytes): + self.version = version + if version == 0: + self.message = v0_OffchainMessage(message) + else: + raise ValueError() + + # Serialize the off-chain message to bytes including full header + def serialize(self) -> bytes: + data: bytes = b"" + # serialize signing domain + data += SIGNING_DOMAIN + + # serialize version and call version specific serializer + data += self.version.to_bytes(1, byteorder='little') + data += self.message.serialize() + return data diff --git a/tests/python/apps/solana_utils.py b/tests/python/apps/solana_utils.py index f18e624e..f282b425 100644 --- a/tests/python/apps/solana_utils.py +++ b/tests/python/apps/solana_utils.py @@ -1,7 +1,11 @@ import base58 +from pathlib import Path -from ragger.bip import pack_derivation_path +from ragger.navigator import NavInsID, NavIns from ragger.utils import create_currency_config +from ragger.bip import pack_derivation_path + +ROOT_SCREENSHOT_PATH = Path(__file__).parent.parent.resolve() ### Some utilities functions for amounts conversions ### @@ -52,3 +56,81 @@ def lamports_to_bytes(lamports: int) -> str: ### Package this currency configuration in exchange format ### SOL_CONF = create_currency_config("SOL", "Solana") + + +def enable_blind_signing(navigator, device_name: str, snapshots_name: str): + if device_name.startswith("nano"): + nav = [NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Go to settings + NavInsID.BOTH_CLICK, # Select blind signing + NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Enable + NavInsID.RIGHT_CLICK, NavInsID.RIGHT_CLICK, NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK # Back to main menu + ] + else: + nav = [NavInsID.USE_CASE_HOME_SETTINGS, + NavIns(NavInsID.TOUCH, (348,132)), + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT] + navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, + snapshots_name, + nav, + screen_change_before_first_instruction=False) + +def enable_short_public_key(navigator, device_name: str, snapshots_name: str): + if device_name.startswith("nano"): + nav = [NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Go to settings + NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Select public key length + NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # short + NavInsID.RIGHT_CLICK, NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK # Back to main menu + ] + else: + nav = [NavInsID.USE_CASE_HOME_SETTINGS, + NavIns(NavInsID.TOUCH, (348,251)), + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT] + navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, + snapshots_name, + nav, + screen_change_before_first_instruction=False) + +def enable_expert_mode(navigator, device_name: str, snapshots_name: str): + if device_name.startswith("nano"): + nav = [NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Go to settings + NavInsID.RIGHT_CLICK, NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # Select Expert mode + NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK, # expert + NavInsID.RIGHT_CLICK, NavInsID.BOTH_CLICK # Back to main menu + ] + else: + nav = [NavInsID.USE_CASE_HOME_SETTINGS, + NavIns(NavInsID.TOUCH, (348,382)), + NavInsID.USE_CASE_SETTINGS_MULTI_PAGE_EXIT] + navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, + snapshots_name, + nav, + screen_change_before_first_instruction=False) + +def _navigation_helper(navigator, device_name: str, accept: bool, snapshots_name: str): + if device_name.startswith("nano"): + navigate_instruction = NavInsID.RIGHT_CLICK + validation_instructions = [NavInsID.BOTH_CLICK] + if accept: + text = "Approve" + else: + text = "Reject" + else: + navigate_instruction = NavInsID.USE_CASE_REVIEW_TAP + text = "Hold to sign" + if accept: + validation_instructions = [NavInsID.USE_CASE_REVIEW_CONFIRM] + else: + validation_instructions = [NavInsID.USE_CASE_REVIEW_REJECT, NavInsID.USE_CASE_CHOICE_CONFIRM] + + + navigator.navigate_until_text_and_compare(navigate_instruction, + validation_instructions, + text, + ROOT_SCREENSHOT_PATH, + snapshots_name) + +def navigation_helper_confirm(navigator, device_name: str, snapshots_name: str): + _navigation_helper(navigator=navigator, device_name=device_name, accept=True, snapshots_name=snapshots_name) + +def navigation_helper_reject(navigator, device_name: str, snapshots_name: str): + _navigation_helper(navigator=navigator, device_name=device_name, accept=False, snapshots_name=snapshots_name) diff --git a/tests/python/conftest.py b/tests/python/conftest.py index fe82c482..ee6f770a 100644 --- a/tests/python/conftest.py +++ b/tests/python/conftest.py @@ -1,151 +1,17 @@ -import pytest -from typing import Optional -from pathlib import Path -from ragger.firmware import Firmware -from ragger.backend import SpeculosBackend, LedgerCommBackend, LedgerWalletBackend -from ragger.navigator import NanoNavigator -from ragger.utils import app_path_from_app_name +from ragger.conftest import configuration +########################### +### CONFIGURATION START ### +########################### -# This variable is needed for Speculos only (physical tests need the application to be already installed) -# Adapt this path to your 'tests/elfs' directory -APPS_DIRECTORY = (Path(__file__).parent.parent / "elfs").resolve() +# You can configure optional parameters by overriding the value of ragger.configuration.OPTIONAL_CONFIGURATION +# Please refer to ragger/conftest/configuration.py for their descriptions and accepted values -# Adapt this name part of the compiled app _.elf in the APPS_DIRECTORY -APP_NAME = "solana" +configuration.OPTIONAL.BACKEND_SCOPE = "function" -BACKENDS = ["speculos", "ledgercomm", "ledgerwallet"] +######################### +### CONFIGURATION END ### +######################### -DEVICES = ["nanos", "nanox", "nanosp", "all"] - -FIRMWARES = [Firmware('nanos', '2.1'), - Firmware('nanox', '2.0.2'), - Firmware('nanosp', '1.0.3')] - - -def pytest_addoption(parser): - parser.addoption("--device", choices=DEVICES, required=True) - parser.addoption("--backend", choices=BACKENDS, default="speculos") - parser.addoption("--display", action="store_true", default=False) - parser.addoption("--golden_run", action="store_true", default=False) - parser.addoption("--log_apdu_file", action="store", default=None) - - -@pytest.fixture(scope="session") -def backend_name(pytestconfig): - return pytestconfig.getoption("backend") - - -@pytest.fixture(scope="session") -def display(pytestconfig): - return pytestconfig.getoption("display") - - -@pytest.fixture(scope="session") -def golden_run(pytestconfig): - return pytestconfig.getoption("golden_run") - - -@pytest.fixture(scope="session") -def log_apdu_file(pytestconfig): - filename = pytestconfig.getoption("log_apdu_file") - return Path(filename).resolve() if filename is not None else None - - -@pytest.fixture -def test_name(request): - # Get the name of current pytest test - test_name = request.node.name - - # Remove firmware suffix: - # - test_xxx_transaction_ok[nanox 2.0.2] - # => test_xxx_transaction_ok - return test_name.split("[")[0] - - -# Glue to call every test that depends on the firmware once for each required firmware -def pytest_generate_tests(metafunc): - if "firmware" in metafunc.fixturenames: - fw_list = [] - ids = [] - - device = metafunc.config.getoption("device") - backend_name = metafunc.config.getoption("backend") - - if device == "all": - if backend_name != "speculos": - raise ValueError("Invalid device parameter on this backend") - - # Add all supported firmwares - for fw in FIRMWARES: - fw_list.append(fw) - ids.append(fw.device + " " + fw.version) - - else: - # Enable firmware for demanded device - for fw in FIRMWARES: - if device == fw.device: - fw_list.append(fw) - ids.append(fw.device + " " + fw.version) - - metafunc.parametrize("firmware", fw_list, ids=ids, scope="session") - - -def prepare_speculos_args(firmware: Firmware, display: bool): - speculos_args = [] - - if display: - speculos_args += ["--display", "qt"] - - app_path = app_path_from_app_name(APPS_DIRECTORY, APP_NAME, firmware.device) - - return ([app_path], {"args": speculos_args}) - - -# Depending on the "--backend" option value, a different backend is -# instantiated, and the tests will either run on Speculos or on a physical -# device depending on the backend -def create_backend(backend_name: str, firmware: Firmware, display: bool, log_apdu_file: Optional[Path]): - if backend_name.lower() == "ledgercomm": - return LedgerCommBackend(firmware=firmware, interface="hid", log_apdu_file=log_apdu_file) - elif backend_name.lower() == "ledgerwallet": - return LedgerWalletBackend(firmware=firmware, log_apdu_file=log_apdu_file) - elif backend_name.lower() == "speculos": - args, kwargs = prepare_speculos_args(firmware, display) - return SpeculosBackend(*args, firmware=firmware, log_apdu_file=log_apdu_file, **kwargs) - else: - raise ValueError(f"Backend '{backend_name}' is unknown. Valid backends are: {BACKENDS}") - - -# This fixture will return the properly configured backend, to be used in tests. -# As Speculos instantiation takes some time, this fixture scope is by default "session". -# If your tests needs to be run on independent Speculos instances (in case they affect -# settings for example), then you should change this fixture scope and choose between -# function, class, module or session. -# @pytest.fixture(scope="session") -@pytest.fixture(scope="function") -def backend(backend_name, firmware, display, log_apdu_file): - with create_backend(backend_name, firmware, display, log_apdu_file) as b: - yield b - - -@pytest.fixture -def navigator(backend, firmware, golden_run): - if firmware.device.startswith("nano"): - return NanoNavigator(backend, firmware, golden_run) - else: - raise ValueError(f"Device '{firmware.device}' is unsupported.") - - -@pytest.fixture(autouse=True) -def use_only_on_backend(request, backend): - if request.node.get_closest_marker('use_on_backend'): - current_backend = request.node.get_closest_marker('use_on_backend').args[0] - if current_backend != backend: - pytest.skip(f'skipped on this backend: "{current_backend}"') - - -def pytest_configure(config): - config.addinivalue_line( - "markers", "use_only_on_backend(backend): skip test if not on the specified backend", - ) +# Pull all features from the base ragger conftest using the overridden configuration +pytest_plugins = ("ragger.conftest.base_conftest", ) diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png new file mode 100644 index 00000000..56cc565f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png new file mode 100644 index 00000000..6d9bff84 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png new file mode 100644 index 00000000..5c8a1106 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png new file mode 100644 index 00000000..a9951555 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png new file mode 100644 index 00000000..ded3b1d8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png new file mode 100644 index 00000000..7a51ba0d Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png new file mode 100644 index 00000000..b904d414 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png new file mode 100644 index 00000000..cfdefea8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png new file mode 100644 index 00000000..af0e7451 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png new file mode 100644 index 00000000..c8835f12 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png new file mode 100644 index 00000000..7c8216f2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png new file mode 100644 index 00000000..8dfe3584 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png new file mode 100644 index 00000000..d35f33e1 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00009.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00010.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00010.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_ok_2/00010.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png new file mode 100644 index 00000000..56cc565f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png new file mode 100644 index 00000000..6d9bff84 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png new file mode 100644 index 00000000..5c8a1106 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png new file mode 100644 index 00000000..a9951555 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png new file mode 100644 index 00000000..ded3b1d8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png new file mode 100644 index 00000000..7a51ba0d Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png new file mode 100644 index 00000000..b904d414 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png new file mode 100644 index 00000000..cfdefea8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png new file mode 100644 index 00000000..af0e7451 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png new file mode 100644 index 00000000..c8835f12 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png new file mode 100644 index 00000000..7c8216f2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png new file mode 100644 index 00000000..8dfe3584 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png new file mode 100644 index 00000000..d35f33e1 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00010.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00010.png new file mode 100644 index 00000000..9c7e7049 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00010.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00011.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00011.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_expert_refused_2/00011.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00000.png new file mode 100644 index 00000000..ded3b1d8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00001.png new file mode 100644 index 00000000..d35f33e1 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00002.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00003.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_ok/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00000.png new file mode 100644 index 00000000..ded3b1d8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00001.png new file mode 100644 index 00000000..d35f33e1 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00002.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00003.png new file mode 100644 index 00000000..9c7e7049 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00004.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_ascii_refused/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png new file mode 100644 index 00000000..c45fbd59 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png new file mode 100644 index 00000000..61294970 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png new file mode 100644 index 00000000..56cc565f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png new file mode 100644 index 00000000..a9951555 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png new file mode 100644 index 00000000..56cc565f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png new file mode 100644 index 00000000..6d9bff84 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png new file mode 100644 index 00000000..5c8a1106 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png new file mode 100644 index 00000000..a9951555 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png new file mode 100644 index 00000000..ded3b1d8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png new file mode 100644 index 00000000..7a51ba0d Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png new file mode 100644 index 00000000..07f1a940 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png new file mode 100644 index 00000000..1b9d999f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png new file mode 100644 index 00000000..20d54857 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png new file mode 100644 index 00000000..9aa6ab7f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png new file mode 100644 index 00000000..209af8ba Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png new file mode 100644 index 00000000..8dfe3584 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00008.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_ok_3/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png new file mode 100644 index 00000000..c45fbd59 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png new file mode 100644 index 00000000..61294970 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png new file mode 100644 index 00000000..56cc565f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png new file mode 100644 index 00000000..a9951555 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png new file mode 100644 index 00000000..56cc565f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png new file mode 100644 index 00000000..6d9bff84 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png new file mode 100644 index 00000000..5c8a1106 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png new file mode 100644 index 00000000..a9951555 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png new file mode 100644 index 00000000..ded3b1d8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png new file mode 100644 index 00000000..7a51ba0d Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png new file mode 100644 index 00000000..07f1a940 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png new file mode 100644 index 00000000..1b9d999f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png new file mode 100644 index 00000000..20d54857 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png new file mode 100644 index 00000000..9aa6ab7f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png new file mode 100644 index 00000000..209af8ba Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png new file mode 100644 index 00000000..8dfe3584 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00009.png new file mode 100644 index 00000000..9c7e7049 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00010.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00010.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_expert_refused_3/00010.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00000.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00001.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00002.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00003.png new file mode 100644 index 00000000..c45fbd59 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00004.png new file mode 100644 index 00000000..61294970 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00005.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00006.png new file mode 100644 index 00000000..56cc565f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00007.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00008.png new file mode 100644 index 00000000..a9951555 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00000.png new file mode 100644 index 00000000..ded3b1d8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00001.png new file mode 100644 index 00000000..20d54857 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00002.png new file mode 100644 index 00000000..9aa6ab7f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00003.png new file mode 100644 index 00000000..209af8ba Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00004.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00005.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_ok_2/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00000.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00001.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00002.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00003.png new file mode 100644 index 00000000..c45fbd59 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00004.png new file mode 100644 index 00000000..61294970 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00005.png new file mode 100644 index 00000000..ed9de4d2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00006.png new file mode 100644 index 00000000..56cc565f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00007.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00007.png new file mode 100644 index 00000000..7acc9818 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00008.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00008.png new file mode 100644 index 00000000..a9951555 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00009.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00009.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00000.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00000.png new file mode 100644 index 00000000..ded3b1d8 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00001.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00001.png new file mode 100644 index 00000000..20d54857 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00002.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00002.png new file mode 100644 index 00000000..9aa6ab7f Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00003.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00003.png new file mode 100644 index 00000000..209af8ba Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00004.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00004.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00005.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00005.png new file mode 100644 index 00000000..9c7e7049 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00005.png differ diff --git a/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00006.png b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00006.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_ledger_sign_offchain_message_utf8_refused_2/00006.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00000.png b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00000.png new file mode 100644 index 00000000..65b2ec60 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00000.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00001.png b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00001.png new file mode 100644 index 00000000..b2f6213b Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00001.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00002.png b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00002.png new file mode 100644 index 00000000..29c47bb3 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00002.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00003.png b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00003.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00003.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00004.png b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00004.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_ok/00004.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00000.png b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00000.png new file mode 100644 index 00000000..65b2ec60 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00000.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00001.png b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00001.png new file mode 100644 index 00000000..b2f6213b Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00001.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00002.png b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00002.png new file mode 100644 index 00000000..29c47bb3 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00002.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00003.png b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00003.png new file mode 100644 index 00000000..66c411c2 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00003.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00004.png b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00004.png new file mode 100644 index 00000000..9c7e7049 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00004.png differ diff --git a/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00005.png b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00005.png new file mode 100644 index 00000000..2b60c836 Binary files /dev/null and b/tests/python/snapshots/nanos/test_solana_get_public_key_refused/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png new file mode 100644 index 00000000..86a1f435 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png new file mode 100644 index 00000000..ada3d07c Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png new file mode 100644 index 00000000..68529eda Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png new file mode 100644 index 00000000..26e38313 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png new file mode 100644 index 00000000..0a415f28 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png new file mode 100644 index 00000000..9595b8ab Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png new file mode 100644 index 00000000..1f8bb2df Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png new file mode 100644 index 00000000..5c23bf26 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png new file mode 100644 index 00000000..86a1f435 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png new file mode 100644 index 00000000..ada3d07c Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png new file mode 100644 index 00000000..68529eda Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png new file mode 100644 index 00000000..26e38313 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png new file mode 100644 index 00000000..0a415f28 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png new file mode 100644 index 00000000..9595b8ab Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png new file mode 100644 index 00000000..1f8bb2df Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png new file mode 100644 index 00000000..5c23bf26 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00001.png new file mode 100644 index 00000000..5c23bf26 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00002.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00003.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_ok/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00001.png new file mode 100644 index 00000000..5c23bf26 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00002.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00003.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00004.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_ascii_refused/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png new file mode 100644 index 00000000..3fd7edaf Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png new file mode 100644 index 00000000..6b36d093 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png new file mode 100644 index 00000000..86a1f435 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png new file mode 100644 index 00000000..ada3d07c Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png new file mode 100644 index 00000000..68529eda Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png new file mode 100644 index 00000000..28d7b6b9 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png new file mode 100644 index 00000000..bad6c8e2 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png new file mode 100644 index 00000000..79d6436d Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png new file mode 100644 index 00000000..1f8bb2df Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png new file mode 100644 index 00000000..3fd7edaf Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png new file mode 100644 index 00000000..6b36d093 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png new file mode 100644 index 00000000..86a1f435 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png new file mode 100644 index 00000000..ada3d07c Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png new file mode 100644 index 00000000..68529eda Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png new file mode 100644 index 00000000..28d7b6b9 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png new file mode 100644 index 00000000..bad6c8e2 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png new file mode 100644 index 00000000..79d6436d Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png new file mode 100644 index 00000000..1f8bb2df Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00003.png new file mode 100644 index 00000000..3fd7edaf Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00004.png new file mode 100644 index 00000000..6b36d093 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00005.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00006.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00001.png new file mode 100644 index 00000000..79d6436d Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00002.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00003.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00003.png new file mode 100644 index 00000000..3fd7edaf Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00004.png new file mode 100644 index 00000000..6b36d093 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00005.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00005.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00006.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00006.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00007.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00008.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00009.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00000.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00001.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00001.png new file mode 100644 index 00000000..79d6436d Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00002.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00002.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00003.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00003.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00004.png b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00004.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_ledger_sign_offchain_message_utf8_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00000.png b/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00000.png new file mode 100644 index 00000000..c233f738 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00001.png b/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00001.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00002.png b/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00002.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_solana_get_public_key_ok/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00000.png b/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00000.png new file mode 100644 index 00000000..c233f738 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00000.png differ diff --git a/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00001.png b/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00001.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00001.png differ diff --git a/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00002.png b/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00002.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00002.png differ diff --git a/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00003.png b/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00003.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanosp/test_solana_get_public_key_refused/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png new file mode 100644 index 00000000..86a1f435 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png new file mode 100644 index 00000000..ada3d07c Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png new file mode 100644 index 00000000..68529eda Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png new file mode 100644 index 00000000..26e38313 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png new file mode 100644 index 00000000..0a415f28 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png new file mode 100644 index 00000000..9595b8ab Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png new file mode 100644 index 00000000..1f8bb2df Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png new file mode 100644 index 00000000..5c23bf26 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_ok_2/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png new file mode 100644 index 00000000..86a1f435 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png new file mode 100644 index 00000000..ada3d07c Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png new file mode 100644 index 00000000..68529eda Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png new file mode 100644 index 00000000..26e38313 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png new file mode 100644 index 00000000..0a415f28 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png new file mode 100644 index 00000000..9595b8ab Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png new file mode 100644 index 00000000..1f8bb2df Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png new file mode 100644 index 00000000..5c23bf26 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_expert_refused_2/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00001.png new file mode 100644 index 00000000..5c23bf26 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00002.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00003.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_ok/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00001.png new file mode 100644 index 00000000..5c23bf26 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00002.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00003.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00004.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_ascii_refused/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png new file mode 100644 index 00000000..3fd7edaf Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png new file mode 100644 index 00000000..6b36d093 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png new file mode 100644 index 00000000..86a1f435 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png new file mode 100644 index 00000000..ada3d07c Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_2/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png new file mode 100644 index 00000000..68529eda Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png new file mode 100644 index 00000000..28d7b6b9 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png new file mode 100644 index 00000000..bad6c8e2 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png new file mode 100644 index 00000000..79d6436d Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png new file mode 100644 index 00000000..1f8bb2df Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_ok_3/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png new file mode 100644 index 00000000..3fd7edaf Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png new file mode 100644 index 00000000..6b36d093 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png new file mode 100644 index 00000000..86a1f435 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png new file mode 100644 index 00000000..ada3d07c Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_2/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png new file mode 100644 index 00000000..68529eda Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png new file mode 100644 index 00000000..28d7b6b9 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png new file mode 100644 index 00000000..bad6c8e2 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png new file mode 100644 index 00000000..79d6436d Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png new file mode 100644 index 00000000..1f8bb2df Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_expert_refused_3/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00003.png new file mode 100644 index 00000000..3fd7edaf Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00004.png new file mode 100644 index 00000000..6b36d093 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00005.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00006.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_1/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00001.png new file mode 100644 index 00000000..79d6436d Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00002.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00003.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_ok_2/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00000.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00001.png new file mode 100644 index 00000000..ab88bd3a Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00002.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00003.png new file mode 100644 index 00000000..3fd7edaf Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00004.png new file mode 100644 index 00000000..6b36d093 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00004.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00005.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00005.png new file mode 100644 index 00000000..b621cda4 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00005.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00006.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00006.png new file mode 100644 index 00000000..423be0a3 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00006.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00007.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00007.png new file mode 100644 index 00000000..667ef296 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00007.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00008.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00008.png new file mode 100644 index 00000000..c00dba11 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00008.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00009.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00009.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_1/00009.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00000.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00000.png new file mode 100644 index 00000000..8b6d9e79 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00000.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00001.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00001.png new file mode 100644 index 00000000..79d6436d Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00001.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00002.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00002.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00002.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00003.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00003.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00003.png differ diff --git a/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00004.png b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00004.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_ledger_sign_offchain_message_utf8_refused_2/00004.png differ diff --git a/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00000.png b/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00000.png new file mode 100644 index 00000000..c233f738 Binary files /dev/null and b/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00000.png differ diff --git a/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00001.png b/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00001.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00001.png differ diff --git a/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00002.png b/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00002.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_solana_get_public_key_ok/00002.png differ diff --git a/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00000.png b/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00000.png new file mode 100644 index 00000000..c233f738 Binary files /dev/null and b/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00000.png differ diff --git a/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00001.png b/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00001.png new file mode 100644 index 00000000..53ae6519 Binary files /dev/null and b/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00001.png differ diff --git a/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00002.png b/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00002.png new file mode 100644 index 00000000..c9222461 Binary files /dev/null and b/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00002.png differ diff --git a/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00003.png b/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00003.png new file mode 100644 index 00000000..890ae49f Binary files /dev/null and b/tests/python/snapshots/nanox/test_solana_get_public_key_refused/00003.png differ diff --git a/tests/python/test_solana.py b/tests/python/test_solana.py index e647e8eb..2d8c42e4 100644 --- a/tests/python/test_solana.py +++ b/tests/python/test_solana.py @@ -1,80 +1,227 @@ from ragger.backend import RaisePolicy -from ragger.navigator import NavInsID +from ragger.navigator import NavInsID, NavIns from ragger.utils import RAPDU from .apps.solana import SolanaClient, ErrorType -from .apps.solana_cmd_builder import SystemInstructionTransfer, Message, verify_signature -from .apps.solana_utils import FOREIGN_PUBLIC_KEY, FOREIGN_PUBLIC_KEY_2, AMOUNT, AMOUNT_2, SOL_PACKED_DERIVATION_PATH, SOL_PACKED_DERIVATION_PATH_2 +from .apps.solana_cmd_builder import SystemInstructionTransfer, Message, verify_signature, OffchainMessage +from .apps.solana_utils import FOREIGN_PUBLIC_KEY, FOREIGN_PUBLIC_KEY_2, AMOUNT, AMOUNT_2, SOL_PACKED_DERIVATION_PATH, SOL_PACKED_DERIVATION_PATH_2, ROOT_SCREENSHOT_PATH +from .apps.solana_utils import enable_blind_signing, enable_short_public_key, enable_expert_mode, navigation_helper_confirm, navigation_helper_reject -from .utils import ROOT_SCREENSHOT_PATH -def test_solana_simple_transfer_ok_1(backend, navigator, test_name): - sol = SolanaClient(backend) - from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) +class TestGetPublicKey: - # Create instruction - instruction: SystemInstructionTransfer = SystemInstructionTransfer(from_public_key, FOREIGN_PUBLIC_KEY, AMOUNT) - message: bytes = Message([instruction]).serialize() + def test_solana_get_public_key_ok(self, backend, navigator, test_name): + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) - with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH, message): - navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, - [NavInsID.BOTH_CLICK], - "Approve", - ROOT_SCREENSHOT_PATH, - test_name) + with sol.send_public_key_with_confirm(SOL_PACKED_DERIVATION_PATH): + if backend.firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Approve", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, + test_name, + [NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CONFIRM]) - signature: bytes = sol.get_async_response().data + assert sol.get_async_response().data == from_public_key - verify_signature(from_public_key, message, signature) + def test_solana_get_public_key_refused(self, backend, navigator, test_name): + sol = SolanaClient(backend) + with sol.send_public_key_with_confirm(SOL_PACKED_DERIVATION_PATH): + backend.raise_policy = RaisePolicy.RAISE_NOTHING + if backend.firmware.device.startswith("nano"): + navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, + [NavInsID.BOTH_CLICK], + "Reject", + ROOT_SCREENSHOT_PATH, + test_name) + else: + navigator.navigate_and_compare(ROOT_SCREENSHOT_PATH, + test_name, + [NavInsID.USE_CASE_ADDRESS_CONFIRMATION_CANCEL]) -def test_solana_simple_transfer_ok_2(backend, navigator, test_name): - sol = SolanaClient(backend) - from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH_2) + assert sol.get_async_response().status == ErrorType.USER_CANCEL - # Create instruction - instruction: SystemInstructionTransfer = SystemInstructionTransfer(from_public_key, FOREIGN_PUBLIC_KEY_2, AMOUNT_2) - message: bytes = Message([instruction]).serialize() - with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH_2, message): - navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, - [NavInsID.BOTH_CLICK], - "Approve", - ROOT_SCREENSHOT_PATH, - test_name) +class TestMessageSigning: - signature: bytes = sol.get_async_response().data + def test_solana_simple_transfer_ok_1(self, backend, navigator, test_name): + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) - verify_signature(from_public_key, message, signature) + # Create instruction + instruction: SystemInstructionTransfer = SystemInstructionTransfer(from_public_key, FOREIGN_PUBLIC_KEY, AMOUNT) + message: bytes = Message([instruction]).serialize() + with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_confirm(navigator, backend.firmware.device, test_name) -def test_solana_simple_transfer_refused(backend, navigator, test_name): - sol = SolanaClient(backend) - from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + signature: bytes = sol.get_async_response().data + verify_signature(from_public_key, message, signature) - instruction: SystemInstructionTransfer = SystemInstructionTransfer(from_public_key, FOREIGN_PUBLIC_KEY, AMOUNT) - message: bytes = Message([instruction]).serialize() - backend.raise_policy = RaisePolicy.RAISE_NOTHING - with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH, message): - navigator.navigate_until_text_and_compare(NavInsID.RIGHT_CLICK, - [NavInsID.BOTH_CLICK], - "Reject", - ROOT_SCREENSHOT_PATH, - test_name) + def test_solana_simple_transfer_ok_2(self, backend, navigator, test_name): + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH_2) - rapdu: RAPDU = sol.get_async_response() - assert rapdu.status == ErrorType.USER_CANCEL + # Create instruction + instruction: SystemInstructionTransfer = SystemInstructionTransfer(from_public_key, FOREIGN_PUBLIC_KEY_2, AMOUNT_2) + message: bytes = Message([instruction]).serialize() + with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH_2, message): + navigation_helper_confirm(navigator, backend.firmware.device, test_name) -def test_solana_blind_sign_refused(backend): - sol = SolanaClient(backend) - from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + signature: bytes = sol.get_async_response().data + verify_signature(from_public_key, message, signature) - instruction: SystemInstructionTransfer = SystemInstructionTransfer(from_public_key, FOREIGN_PUBLIC_KEY, AMOUNT) - message: bytes = Message([instruction]).serialize() - backend.raise_policy = RaisePolicy.RAISE_NOTHING - rapdu: RAPDU = sol.send_blind_sign_message(SOL_PACKED_DERIVATION_PATH, message) - assert rapdu.status == ErrorType.SDK_NOT_SUPPORTED + def test_solana_simple_transfer_refused(self, backend, navigator, test_name): + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + instruction: SystemInstructionTransfer = SystemInstructionTransfer(from_public_key, FOREIGN_PUBLIC_KEY, AMOUNT) + message: bytes = Message([instruction]).serialize() + + backend.raise_policy = RaisePolicy.RAISE_NOTHING + with sol.send_async_sign_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_reject(navigator, backend.firmware.device, test_name) + + rapdu: RAPDU = sol.get_async_response() + assert rapdu.status == ErrorType.USER_CANCEL + + +class TestOffchainMessageSigning: + + def test_ledger_sign_offchain_message_ascii_ok(self, backend, navigator, test_name): + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + offchain_message: OffchainMessage = OffchainMessage(0, b"Test message") + message: bytes = offchain_message.serialize() + + with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_confirm(navigator, backend.firmware.device, test_name) + + signature: bytes = sol.get_async_response().data + verify_signature(from_public_key, message, signature) + + + def test_ledger_sign_offchain_message_ascii_refused(self, backend, navigator, test_name): + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + offchain_message: OffchainMessage = OffchainMessage(0, b"Test message") + message: bytes = offchain_message.serialize() + + backend.raise_policy = RaisePolicy.RAISE_NOTHING + with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_reject(navigator, backend.firmware.device, test_name) + + rapdu: RAPDU = sol.get_async_response() + assert rapdu.status == ErrorType.USER_CANCEL + + + def test_ledger_sign_offchain_message_ascii_expert_ok(self, backend, navigator, test_name): + enable_expert_mode(navigator, backend.firmware.device, test_name + "_1") + + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + offchain_message: OffchainMessage = OffchainMessage(0, b"Test message") + message: bytes = offchain_message.serialize() + + with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_confirm(navigator, backend.firmware.device, test_name + "_2") + + signature: bytes = sol.get_async_response().data + verify_signature(from_public_key, message, signature) + + + def test_ledger_sign_offchain_message_ascii_expert_refused(self, backend, navigator, test_name): + enable_expert_mode(navigator, backend.firmware.device, test_name + "_1") + + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + offchain_message: OffchainMessage = OffchainMessage(0, b"Test message") + message: bytes = offchain_message.serialize() + + backend.raise_policy = RaisePolicy.RAISE_NOTHING + with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_reject(navigator, backend.firmware.device, test_name + "_2") + + rapdu: RAPDU = sol.get_async_response() + assert rapdu.status == ErrorType.USER_CANCEL + + + def test_ledger_sign_offchain_message_utf8_ok(self, backend, navigator, test_name): + enable_blind_signing(navigator, backend.firmware.device, test_name + "_1") + + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + offchain_message: OffchainMessage = OffchainMessage(0, bytes("Тестовое сообщение", 'utf-8')) + message: bytes = offchain_message.serialize() + + with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_confirm(navigator, backend.firmware.device, test_name + "_2") + + signature: bytes = sol.get_async_response().data + verify_signature(from_public_key, message, signature) + + + def test_ledger_sign_offchain_message_utf8_refused(self, backend, navigator, test_name): + enable_blind_signing(navigator, backend.firmware.device, test_name + "_1") + + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + offchain_message: OffchainMessage = OffchainMessage(0, bytes("Тестовое сообщение", 'utf-8')) + message: bytes = offchain_message.serialize() + + backend.raise_policy = RaisePolicy.RAISE_NOTHING + with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_reject(navigator, backend.firmware.device, test_name + "_2") + + rapdu: RAPDU = sol.get_async_response() + assert rapdu.status == ErrorType.USER_CANCEL + + + def test_ledger_sign_offchain_message_utf8_expert_ok(self, backend, navigator, test_name): + enable_blind_signing(navigator, backend.firmware.device, test_name + "_1") + enable_expert_mode(navigator, backend.firmware.device, test_name + "_2") + + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + offchain_message: OffchainMessage = OffchainMessage(0, bytes("Тестовое сообщение", 'utf-8')) + message: bytes = offchain_message.serialize() + + with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_confirm(navigator, backend.firmware.device, test_name + "_3") + + signature: bytes = sol.get_async_response().data + verify_signature(from_public_key, message, signature) + + + def test_ledger_sign_offchain_message_utf8_expert_refused(self, backend, navigator, test_name): + enable_blind_signing(navigator, backend.firmware.device, test_name + "_1") + enable_expert_mode(navigator, backend.firmware.device, test_name + "_2") + + sol = SolanaClient(backend) + from_public_key = sol.get_public_key(SOL_PACKED_DERIVATION_PATH) + + offchain_message: OffchainMessage = OffchainMessage(0, bytes("Тестовое сообщение", 'utf-8')) + message: bytes = offchain_message.serialize() + + backend.raise_policy = RaisePolicy.RAISE_NOTHING + with sol.send_async_sign_offchain_message(SOL_PACKED_DERIVATION_PATH, message): + navigation_helper_reject(navigator, backend.firmware.device, test_name + "_3") + + rapdu: RAPDU = sol.get_async_response() + assert rapdu.status == ErrorType.USER_CANCEL diff --git a/tests/python/utils.py b/tests/python/utils.py deleted file mode 100644 index 1d79e50f..00000000 --- a/tests/python/utils.py +++ /dev/null @@ -1,3 +0,0 @@ -from pathlib import Path - -ROOT_SCREENSHOT_PATH = Path(__file__).parent.resolve()