What changed, and why it matters
This commit is a simple bulk rename of an internal feature code name from 'N4W1' to 'N1W1' across the Trezor firmware codebase, build system, tests, and client libraries. It changes only identifiers, comments, strings, and generated protocol-buffer files. There is no functional change and no security relevance.
No security action required. Treat as a routine refactoring/rename commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit performs a global identifier rename: all occurrences of ‘n4w1’/’N4W1’ are replaced with ‘n1w1’/’N1W1’. Affected artifacts include GitHub Actions workflow matrix variables and artifact names, Cargo feature flags, C preprocessor macros, Python/C/Rust source identifiers, protobuf message and enum definitions, generated protobuf bindings, translation keys, CLI option names, and test helper functions. The numeric wire types and enum values are preserved; only human-readable names change. No logic, behavior, or security boundary is modified.
Changed components
Trezor firmware build system (core/Makefile, xtask, Cargo features)GitHub Actions CI workflow (.github/workflows/core.yml)Protocol buffer definitions (messages-debug.proto, messages-management.proto, messages.proto)Generated protobuf bindings (Python, Rust)Firmware Python/C/Rust source (apps/debug, apps/management, trezor/enums, trezor/messages, trezor/utils, trezor/ui/layouts)trezorlib Python clientrust/trezor-clientTranslation files (cs, de, en, es, fr, pt)Test fixtures and input flowsInspect captured patch +506 / −506
### .github/workflows/core.yml
@@ -47,15 +47,15 @@ jobs:
cat $GITHUB_OUTPUT
core_firmware:
- name: Build firmware (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.type }}${{matrix.n4w1 && ', n4w1' || '' }})
+ name: Build firmware (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.type }}${{matrix.n1w1 && ', n1w1' || '' }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
model: ${{ fromJSON(github.event_name == 'push' && '["T2B1", "T2T1", "T3B1", "T3T1", "T3W1"]' || '["T2T1", "T3B1", "T3T1", "T3W1"]') }}
coins: [universal, btconly]
type: ${{ fromJSON(github.event_name == 'schedule' && '["normal", "debuglink", "production"]' || '["normal", "debuglink"]') }}
- n4w1: [false]
+ n1w1: [false]
include:
- model: D001
coins: universal
@@ -66,15 +66,15 @@ jobs:
- model: T3W1
coins: universal
type: debuglink
- n4w1: true # currently N4W1 is not supported for normal builds
+ n1w1: true # currently N1W1 is not supported for normal builds
exclude:
- model: T3W1
type: production
env:
TREZOR_MODEL: ${{ matrix.model }}
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
PYOPT: ${{ matrix.type == 'debuglink' && '0' || '1' }}
- N4W1: ${{ matrix.n4w1 && '1' || '0' }}
+ N1W1: ${{ matrix.n1w1 && '1' || '0' }}
PRODUCTION: ${{ matrix.type == 'production' && '1' || '0' }}
BOOTLOADER_DEVEL: ${{ matrix.model == 'T3W1' && '1' || '0' }}
steps:
@@ -97,15 +97,15 @@ jobs:
if: matrix.coins == 'btconly' && matrix.type != 'debuglink'
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
- name: core-firmware-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}${{ matrix.n4w1 && '-n4w1' || '' }}
+ name: core-firmware-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}${{ matrix.n1w1 && '-n1w1' || '' }}
path: |
core/build-xtask/artifacts/latest/*.bin
core/build-xtask/artifacts/latest/*.elf
core/build-xtask/artifacts/pub/*
retention-days: 7
core_emu:
- name: Build emu (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.type }}, ${{ matrix.asan }}${{matrix.n4w1 && ', n4w1' || '' }})
+ name: Build emu (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.type }}, ${{ matrix.asan }}${{matrix.n1w1 && ', n1w1' || '' }})
runs-on: ubuntu-latest
needs: param
strategy:
@@ -116,7 +116,7 @@ jobs:
# type: [normal, debuglink]
type: ${{ fromJSON(github.event_name == 'schedule' && '["normal", "debuglink"]' || '["debuglink"]') }}
asan: ${{ fromJSON(needs.param.outputs.asan) }}
- n4w1: [false]
+ n1w1: [false]
exclude:
- type: normal
asan: asan
@@ -125,12 +125,12 @@ jobs:
coins: universal
type: debuglink
asan: noasan
- n4w1: true # currently N4W1 is not supported for normal builds
+ n1w1: true # currently N1W1 is not supported for normal builds
env:
TREZOR_MODEL: ${{ matrix.model }}
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
PYOPT: ${{ matrix.type == 'debuglink' && '0' || '1' }}
- N4W1: ${{ matrix.n4w1 && '1' || '0' }}
+ N1W1: ${{ matrix.n1w1 && '1' || '0' }}
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
LSAN_OPTIONS: "suppressions=../../asan_suppressions.txt"
steps:
@@ -142,10 +142,10 @@ jobs:
if: matrix.coins == 'universal' && matrix.asan == 'noasan'
- run: nix-shell --run "uv run make -C core build_unix_frozen"
- run: nix-shell --run "uv run make -C core test_emu_sanity"
- - run: cp core/build-xtask/artifacts/latest/firmware-emu core/build-xtask/artifacts/latest/firmware-emu-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n4w1 && '-n4w1' || '' }}
+ - run: cp core/build-xtask/artifacts/latest/firmware-emu core/build-xtask/artifacts/latest/firmware-emu-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n1w1 && '-n1w1' || '' }}
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
- name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}${{ matrix.n4w1 && '-n4w1' || '' }}
+ name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}${{ matrix.n1w1 && '-n1w1' || '' }}
path: |
core/build-xtask/artifacts/latest/firmware-emu*
core/build-xtask/artifacts/latest/bootloader-emu
@@ -154,7 +154,7 @@ jobs:
core_emu_arm:
if: github.event_name == 'schedule'
- name: Build emu ARM (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.type }}, ${{ matrix.asan }}${{matrix.n4w1 && ', n4w1' || '' }})
+ name: Build emu ARM (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.type }}, ${{ matrix.asan }}${{matrix.n1w1 && ', n1w1' || '' }})
runs-on: ubuntu-latest-arm64
needs: param
strategy:
@@ -164,18 +164,18 @@ jobs:
coins: [universal]
type: [debuglink]
asan: [noasan]
- n4w1: [false]
+ n1w1: [false]
include:
- model: T3W1
coins: universal
type: debuglink
asan: noasan
- n4w1: true # currently N4W1 is not supported for normal builds
+ n1w1: true # currently N1W1 is not supported for normal builds
env:
TREZOR_MODEL: ${{ matrix.model }}
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
PYOPT: ${{ matrix.type == 'debuglink' && '0' || '1' }}
- N4W1: ${{ matrix.n4w1 && '1' || '0' }}
+ N1W1: ${{ matrix.n1w1 && '1' || '0' }}
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
LSAN_OPTIONS: "suppressions=../../asan_suppressions.txt"
steps:
@@ -186,10 +186,10 @@ jobs:
- run: nix-shell --run "uv run make -C core build_bootloader_emu"
if: matrix.coins == 'universal'
- run: nix-shell --run "uv run make -C core build_unix_frozen"
- - run: mv core/build-xtask/artifacts/latest/firmware-emu core/build-xtask/artifacts/latest/firmware-emu-arm-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n4w1 && '-n4w1' || '' }}
+ - run: mv core/build-xtask/artifacts/latest/firmware-emu core/build-xtask/artifacts/latest/firmware-emu-arm-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n1w1 && '-n1w1' || '' }}
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
- name: core-emu-arm-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}${{ matrix.n4w1 && '-n4w1' || '' }}
+ name: core-emu-arm-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}${{ matrix.n1w1 && '-n1w1' || '' }}
path: |
core/build-xtask/artifacts/latest/firmware-emu*
core/build-xtask/artifacts/latest/bootloader-emu
@@ -305,7 +305,7 @@ jobs:
# See artifacts for a comprehensive report of UI.
# See [docs/tests/ui-tests](../tests/ui-tests.md) for more info.
core_device_test:
- name: Device tests (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.asan }}, ${{ matrix.lang }}${{ matrix.n4w1 && ', n4w1' || '' }})
+ name: Device tests (${{ matrix.model }}, ${{ matrix.coins }}, ${{ matrix.asan }}, ${{ matrix.lang }}${{ matrix.n1w1 && ', n1w1' || '' }})
runs-on: ubuntu-latest
needs:
- param
@@ -317,13 +317,13 @@ jobs:
coins: [universal, btconly]
asan: ${{ fromJSON(needs.param.outputs.asan) }}
lang: ${{ fromJSON(needs.param.outputs.test_lang) }}
- n4w1: [false]
+ n1w1: [false]
include:
- model: T3W1
coins: universal
asan: noasan
lang: en
- n4w1: true
+ n1w1: true
env:
TREZOR_PROFILING: ${{ matrix.asan == 'noasan' && '1' || '0' }}
TREZOR_MODEL: ${{ matrix.model }}
@@ -339,21 +339,21 @@ jobs:
submodules: recursive
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
with:
- name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-debuglink-${{ matrix.asan }}${{ matrix.n4w1 && '-n4w1' || '' }}
+ name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-debuglink-${{ matrix.asan }}${{ matrix.n1w1 && '-n1w1' || '' }}
path: core/build-xtask/artifacts/latest
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
- uses: ./.github/actions/environment
- name: Run device tests
- if: ${{ !matrix.n4w1 }}
+ if: ${{ !matrix.n1w1 }}
run: nix-shell --run "uv run make -C core ${{ env.ACTIONS_DO_UI_TEST == 'true' && 'test_emu_ui_multicore' || 'test_emu' }}"
- - name: Run device tests (N4W1)
- if: ${{ matrix.n4w1 }} # TODO(N4W1): test N4W1 UI fixtures as well
+ - name: Run device tests (N1W1)
+ if: ${{ matrix.n1w1 }} # TODO(N1W1): test N1W1 UI fixtures as well
run: nix-shell --run "uv run make -C core ${{ env.ACTIONS_DO_UI_TEST == 'true' && 'test_emu_multicore' || 'test_emu' }}"
- run: tail -v -n50 tests/trezor*.log || true
if: failure()
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
with:
- name: core-test-device-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.lang }}-${{ matrix.asan }}${{ matrix.n4w1 && '-n4w1' || '' }}
+ name: core-test-device-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.lang }}-${{ matrix.asan }}${{ matrix.n1w1 && '-n1w1' || '' }}
path: tests/trezor*.log
retention-days: 7
if: always()
@@ -362,10 +362,10 @@ jobs:
model: ${{ matrix.model }}
lang: ${{ matrix.lang }}
status: ${{ job.status }}
- if: ${{ always() && env.ACTIONS_DO_UI_TEST == 'true' && !matrix.n4w1 }}
+ if: ${{ always() && env.ACTIONS_DO_UI_TEST == 'true' && !matrix.n1w1 }}
continue-on-error: true
- uses: ./.github/actions/upload-coverage
- if: ${{ !matrix.n4w1 }}
+ if: ${{ !matrix.n1w1 }}
# Click tests - UI.
# See [docs/tests/click-tests](../tests/click-tests.md) for more info.
### common/protob/messages-debug.proto
@@ -315,39 +315,39 @@ message DebugLinkSetLogFilter {
}
/**
- * Request: Start N4W1 exchange over DebugLink (initiated by the host).
- * Blocks until there is a N4W1 request to be handled.
+ * Request: Start N1W1 exchange over DebugLink (initiated by the host).
+ * Blocks until there is a N1W1 request to be handled.
* @start
- * @next DebugLinkN4W1Read
- * @next DebugLinkN4W1Write
+ * @next DebugLinkN1W1Read
+ * @next DebugLinkN1W1Write
*/
-message DebugLinkN4W1Connected {}
+message DebugLinkN1W1Connected {}
/**
- * Request: Simulate N4W1 write over DebugLink (sent by the device).
+ * Request: Simulate N1W1 write over DebugLink (sent by the device).
* @start
- * @next DebugLinkN4W1Response
+ * @next DebugLinkN1W1Response
*/
-message DebugLinkN4W1Write {
+message DebugLinkN1W1Write {
optional string key = 1;
optional bytes value = 2; // if is None, the entry is deleted
}
/**
- * Request: Simulate N4W1 read over DebugLink (sent by the device).
+ * Request: Simulate N1W1 read over DebugLink (sent by the device).
* @start
- * @next DebugLinkN4W1Response
+ * @next DebugLinkN1W1Response
*/
-message DebugLinkN4W1Read {
+message DebugLinkN1W1Read {
optional string key = 1;
}
/**
- * Response: Simulate N4W1 read/write result over DebugLink (sent by the host).
- * @next DebugLinkN4W1Read
- * @next DebugLinkN4W1Write
+ * Response: Simulate N1W1 read/write result over DebugLink (sent by the host).
+ * @next DebugLinkN1W1Read
+ * @next DebugLinkN1W1Write
* @next Success
*/
-message DebugLinkN4W1Response {
+message DebugLinkN1W1Response {
optional bytes value = 1; // existing value is returned on write/delete, `None` if key is missing
}
### common/protob/messages-management.proto
@@ -27,7 +27,7 @@ enum BackupType {
*/
enum BackupMethod {
Display = 0; // the share words are displayed on the device screen
- N4W1 = 1;
+ N1W1 = 1;
}
/**
@@ -190,7 +190,7 @@ message Features {
Capability_BLE = 22 [(bitcoin_only) = true]; // Bluetooth Low Energy
Capability_NFC = 23 [(bitcoin_only) = true]; // Near Field Communications
Capability_Tron = 24;
- Capability_N4W1 = 25 [(bitcoin_only) = true];
+ Capability_N1W1 = 25 [(bitcoin_only) = true];
Capability_TouchWakeup = 26 [(bitcoin_only) = true]; // Touch to wake from sleep
reserved 27; // reserved for internal use
}
### common/protob/messages.proto
@@ -149,10 +149,10 @@ enum MessageType {
MessageType_DebugLinkGetPairingInfo = 9011 [(bitcoin_only) = true, (wire_debug_in) = true];
MessageType_DebugLinkPairingInfo = 9012 [(bitcoin_only) = true, (wire_debug_out) = true];
MessageType_DebugLinkSetLogFilter = 9013 [(bitcoin_only) = true, (wire_debug_in) = true];
- MessageType_DebugLinkN4W1Connected = 9014 [(bitcoin_only) = true, (wire_debug_in) = true];
- MessageType_DebugLinkN4W1Write = 9015 [(bitcoin_only) = true, (wire_debug_out) = true];
- MessageType_DebugLinkN4W1Read = 9016 [(bitcoin_only) = true, (wire_debug_out) = true];
- MessageType_DebugLinkN4W1Response = 9017 [(bitcoin_only) = true, (wire_debug_in) = true];
+ MessageType_DebugLinkN1W1Connected = 9014 [(bitcoin_only) = true, (wire_debug_in) = true];
+ MessageType_DebugLinkN1W1Write = 9015 [(bitcoin_only) = true, (wire_debug_out) = true];
+ MessageType_DebugLinkN1W1Read = 9016 [(bitcoin_only) = true, (wire_debug_out) = true];
+ MessageType_DebugLinkN1W1Response = 9017 [(bitcoin_only) = true, (wire_debug_in) = true];
MessageType_DebugLinkSetBatteryState = 9018 [(bitcoin_only) = true, (wire_debug_in) = true];
// Ethereum
### core/Makefile
@@ -67,8 +67,8 @@ endif
ifeq ($(BOOTLOADER_DEVEL),1)
XTASK_BUILD_OPTS += --bootloader-devel
endif
-ifeq ($(N4W1),1)
-XTASK_BUILD_OPTS += --n4w1
+ifeq ($(N1W1),1)
+XTASK_BUILD_OPTS += --n1w1
endif
ifeq ($(PRODUCTION),1)
XTASK_BUILD_OPTS += --production
### core/embed/projects/firmware/Cargo.toml
@@ -37,7 +37,7 @@ force_bootloader_upgrade = []
frozen = ["upymod/frozen"]
log_stack_usage = ["upymod/log_stack_usage"]
micropy_enable_source_lines = ["upymod/enable_source_lines"]
-n4w1 = ["upymod/n4w1"]
+n1w1 = ["upymod/n1w1"]
optiga_testing = ["sec/optiga_testing"]
production = ["io/production"]
pyopt = ["upymod/pyopt"]
### core/embed/projects/firmware/project.toml
@@ -68,7 +68,7 @@ force-bootloader-upgrade = { true = ["force_bootloader_upgrade"] }
frozen = { true = ["frozen"] }
log-stack-usage = { true = ["log_stack_usage"] }
mem-perf = { true = ["memperf"] }
-n4w1 = { true = ["n4w1"] }
+n1w1 = { true = ["n1w1"] }
perf-overlay = { true = ["ui_performance_overlay"] }
production = { true = ["production"], false = ["dev_keys"] }
pyopt = { true = ["pyopt"], false = ["debug", "optiga_testing", "ui_debug_overlay"] }
### core/embed/projects/unix/Cargo.toml
@@ -36,7 +36,7 @@ frozen = ["upymod/frozen"]
log_stack_usage = ["upymod/log_stack_usage"]
memperf = ["upymod/memperf"]
micropy_enable_source_lines = ["upymod/enable_source_lines"]
-n4w1 = ["upymod/n4w1"]
+n1w1 = ["upymod/n1w1"]
optiga_testing = ["sec/optiga_testing"]
pyopt = ["upymod/pyopt"]
ui_debug = ["trezor_lib/ui_debug"]
### core/embed/rust/Cargo.toml
@@ -76,7 +76,7 @@ layout_caesar = []
layout_delizia = []
layout_eckhart = []
micropython = ["dep:upymod"]
-n4w1 = []
+n1w1 = []
nrf = []
optiga = []
pmic = []
### core/embed/rust/librust_qstr.h
@@ -172,7 +172,7 @@ static void _librust_qstrs(void) {
MP_QSTR_backup__title_skip;
MP_QSTR_backup__type_create;
MP_QSTR_backup__type_have;
- MP_QSTR_backup__type_n4w1;
+ MP_QSTR_backup__type_n1w1;
MP_QSTR_backup__type_wordlist;
MP_QSTR_backup__want_to_skip;
MP_QSTR_backup_check_allowed;
@@ -515,17 +515,17 @@ static void _librust_qstrs(void) {
MP_QSTR_modify_fee__transaction_fee;
MP_QSTR_more_info_callback;
MP_QSTR_multiple_pages_texts;
- MP_QSTR_n4w1__err_damaged;
- MP_QSTR_n4w1__err_empty;
- MP_QSTR_n4w1__err_nonempty;
- MP_QSTR_n4w1__footer_first;
- MP_QSTR_n4w1__footer_last;
- MP_QSTR_n4w1__footer_next;
- MP_QSTR_n4w1__hold_first;
- MP_QSTR_n4w1__hold_last;
- MP_QSTR_n4w1__hold_next;
- MP_QSTR_n4w1__reading;
- MP_QSTR_n4w1__writing;
+ MP_QSTR_n1w1__err_damaged;
+ MP_QSTR_n1w1__err_empty;
+ MP_QSTR_n1w1__err_nonempty;
+ MP_QSTR_n1w1__footer_first;
+ MP_QSTR_n1w1__footer_last;
+ MP_QSTR_n1w1__footer_next;
+ MP_QSTR_n1w1__hold_first;
+ MP_QSTR_n1w1__hold_last;
+ MP_QSTR_n1w1__hold_next;
+ MP_QSTR_n1w1__reading;
+ MP_QSTR_n1w1__writing;
MP_QSTR_next_timeout;
MP_QSTR_notification;
MP_QSTR_packet_in;
### core/embed/rust/src/translations/generated/translated_string.rs
@@ -1512,13 +1512,13 @@ pub enum TranslatedString {
ethereum__confirm_contract = 1183, // "Confirm contract"
words__intent = 1184, // "Intent"
suite_sync__rotate_key = 1185, // "You are about to rotate the delegated identity key used for Suite Sync. This will invalidate previous keys. Do you want to proceed?"
- n4w1__footer_first = 1186, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Start with any tag"}
- n4w1__footer_last = 1187, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Use the last remaining tag"}
- n4w1__footer_next = 1188, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Use any remaining tag"}
- n4w1__hold_first = 1189, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Hold the first tag to the back of this Trezor."}
- n4w1__hold_last = 1190, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Hold the last tag to the back of this Trezor."}
- n4w1__hold_next = 1191, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Hold the next tag to the back of this Trezor."}
- n4w1__writing = 1192, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Writing to tag..."}
+ n1w1__footer_first = 1186, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Start with any tag"}
+ n1w1__footer_last = 1187, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Use the last remaining tag"}
+ n1w1__footer_next = 1188, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Use any remaining tag"}
+ n1w1__hold_first = 1189, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Hold the first tag to the back of this Trezor."}
+ n1w1__hold_last = 1190, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Hold the last tag to the back of this Trezor."}
+ n1w1__hold_next = 1191, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Hold the next tag to the back of this Trezor."}
+ n1w1__writing = 1192, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Writing to tag..."}
#[cfg(feature = "universal_fw")]
ethereum__deposit_amount = 1193, // "Deposit amount"
#[cfg(feature = "universal_fw")]
@@ -1547,7 +1547,7 @@ pub enum TranslatedString {
cardano__credential_intro_template = 1207, // {"Bolt": "{0} credential is a {1}", "Caesar": "{0} credential is a {1}", "Delizia": "{0} credential is a {1}:", "Eckhart": "{0} credential is a {1}:"}
#[cfg(feature = "universal_fw")]
cardano__key_path = 1208, // "key path"
- backup__type_n4w1 = 1209, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "N4W1 backup"}
+ backup__type_n1w1 = 1209, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "N1W1 backup"}
backup__type_wordlist = 1210, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Wordlist backup"}
#[cfg(feature = "universal_fw")]
ethereum__title_token_contract = 1211, // {"Bolt": "Token contract", "Caesar": "Token contract address", "Delizia": "Token contract", "Eckhart": "Token contract address"}
@@ -1569,10 +1569,10 @@ pub enum TranslatedString {
ethereum__calldata_suffix = 1219, // "Calldata suffix"
backup__type_create = 1220, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Select the type of wallet backup you want to create."}
backup__type_have = 1221, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Which type of wallet backup do you have?"}
- n4w1__reading = 1222, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Reading tag..."}
- n4w1__err_empty = 1223, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "This tag is empty. Continue to scan a different tag."}
- n4w1__err_nonempty = 1224, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Non-empty N4W1 tag."}
- n4w1__err_damaged = 1225, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "This tag is damaged. Continue to try again or scan the next tag."}
+ n1w1__reading = 1222, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Reading tag..."}
+ n1w1__err_empty = 1223, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "This tag is empty. Continue to scan a different tag."}
+ n1w1__err_nonempty = 1224, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "Non-empty N1W1 tag."}
+ n1w1__err_damaged = 1225, // {"Bolt": "", "Caesar": "", "Delizia": "", "Eckhart": "This tag is damaged. Continue to try again or scan the next tag."}
#[cfg(feature = "universal_fw")]
ripple__account_deletion_warning = 1226, // "Delete Ripple account?"
#[cfg(feature = "universal_fw")]
@@ -34066,7 +34066,7 @@ impl TranslatedString {
"",
"{0} credential is a {1}:",
"key path",
- "N4W1 backup",
+ "N1W1 backup",
"Wordlist backup",
"Token contract address",
"Redeem",
@@ -34081,7 +34081,7 @@ impl TranslatedString {
"Which type of wallet backup do you have?",
"Reading tag...",
"This tag is empty. Continue to scan a different tag.",
- "Non-empty N4W1 tag.",
+ "Non-empty N1W1 tag.",
"This tag is damaged. Continue to try again or scan the next tag.",
"Delete Ripple account?",
"To be deleted",
@@ -36663,7 +36663,7 @@ impl TranslatedString {
"",
"{0} credential is a {1}:",
"key path",
- "N4W1 backup",
+ "N1W1 backup",
"Wordlist backup",
"Token contract address",
"Redeem",
@@ -36678,7 +36678,7 @@ impl TranslatedString {
"Which type of wallet backup do you have?",
"Reading tag...",
"This tag is empty. Continue to scan a different tag.",
- "Non-empty N4W1 tag.",
+ "Non-empty N1W1 tag.",
"This tag is damaged. Continue to try again or scan the next tag.",
"Delete Ripple account?",
"To be deleted",
@@ -39260,7 +39260,7 @@ impl TranslatedString {
"",
"{0} credential is a {1}:",
"key path",
- "N4W1 backup",
+ "N1W1 backup",
"Wordlist backup",
"Token contract address",
"Redeem",
@@ -39275,7 +39275,7 @@ impl TranslatedString {
"Which type of wallet backup do you have?",
"Reading tag...",
"This tag is empty. Continue to scan a different tag.",
- "Non-empty N4W1 tag.",
+ "Non-empty N1W1 tag.",
"This tag is damaged. Continue to try again or scan the next tag.",
"Delete Ripple account?",
"To be deleted",
@@ -41857,7 +41857,7 @@ impl TranslatedString {
"",
"{0} credential is a {1}:",
"key path",
- "N4W1 backup",
+ "N1W1 backup",
"Wordlist backup",
"Token contract address",
"Redeem",
@@ -41872,7 +41872,7 @@ impl TranslatedString {
"Which type of wallet backup do you have?",
"Reading tag...",
"This tag is empty. Continue to scan a different tag.",
- "Non-empty N4W1 tag.",
+ "Non-empty N1W1 tag.",
"This tag is damaged. Continue to try again or scan the next tag.",
"Delete Ripple account?",
"To be deleted",
@@ -43301,7 +43301,7 @@ impl TranslatedString {
(Qstr::MP_QSTR_backup__title_skip, Self::backup__title_skip),
(Qstr::MP_QSTR_backup__type_create, Self::backup__type_create),
(Qstr::MP_QSTR_backup__type_have, Self::backup__type_have),
- (Qstr::MP_QSTR_backup__type_n4w1, Self::backup__type_n4w1),
+ (Qstr::MP_QSTR_backup__type_n1w1, Self::backup__type_n1w1),
(Qstr::MP_QSTR_backup__type_wordlist, Self::backup__type_wordlist),
(Qstr::MP_QSTR_backup__want_to_skip, Self::backup__want_to_skip),
(Qstr::MP_QSTR_bitcoin__commitment_data, Self::bitcoin__commitment_data),
@@ -44074,17 +44074,17 @@ impl TranslatedString {
(Qstr::MP_QSTR_monero__wanna_start_refresh, Self::monero__wanna_start_refresh),
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_monero__wanna_sync_key_images, Self::monero__wanna_sync_key_images),
- (Qstr::MP_QSTR_n4w1__err_damaged, Self::n4w1__err_damaged),
- (Qstr::MP_QSTR_n4w1__err_empty, Self::n4w1__err_empty),
- (Qstr::MP_QSTR_n4w1__err_nonempty, Self::n4w1__err_nonempty),
- (Qstr::MP_QSTR_n4w1__footer_first, Self::n4w1__footer_first),
- (Qstr::MP_QSTR_n4w1__footer_last, Self::n4w1__footer_last),
- (Qstr::MP_QSTR_n4w1__footer_next, Self::n4w1__footer_next),
- (Qstr::MP_QSTR_n4w1__hold_first, Self::n4w1__hold_first),
- (Qstr::MP_QSTR_n4w1__hold_last, Self::n4w1__hold_last),
- (Qstr::MP_QSTR_n4w1__hold_next, Self::n4w1__hold_next),
- (Qstr::MP_QSTR_n4w1__reading, Self::n4w1__reading),
- (Qstr::MP_QSTR_n4w1__writing, Self::n4w1__writing),
+ (Qstr::MP_QSTR_n1w1__err_damaged, Self::n1w1__err_damaged),
+ (Qstr::MP_QSTR_n1w1__err_empty, Self::n1w1__err_empty),
+ (Qstr::MP_QSTR_n1w1__err_nonempty, Self::n1w1__err_nonempty),
+ (Qstr::MP_QSTR_n1w1__footer_first, Self::n1w1__footer_first),
+ (Qstr::MP_QSTR_n1w1__footer_last, Self::n1w1__footer_last),
+ (Qstr::MP_QSTR_n1w1__footer_next, Self::n1w1__footer_next),
+ (Qstr::MP_QSTR_n1w1__hold_first, Self::n1w1__hold_first),
+ (Qstr::MP_QSTR_n1w1__hold_last, Self::n1w1__hold_last),
+ (Qstr::MP_QSTR_n1w1__hold_next, Self::n1w1__hold_next),
+ (Qstr::MP_QSTR_n1w1__reading, Self::n1w1__reading),
+ (Qstr::MP_QSTR_n1w1__writing, Self::n1w1__writing),
#[cfg(feature = "universal_fw")]
(Qstr::MP_QSTR_nem__absolute, Self::nem__absolute),
#[cfg(feature = "universal_fw")]
### core/embed/upymod/Cargo.toml
@@ -51,7 +51,7 @@ layout_eckhart = []
log_stack_usage = []
mcu_attestation = ["sec/mcu_attestation"]
memperf = []
-n4w1 = []
+n1w1 = []
nem = []
optiga = ["sec/optiga"]
power_manager = ["io/power_manager"]
### core/embed/upymod/build.rs
@@ -68,8 +68,8 @@ fn main() -> Result<()> {
lib.add_define("MICROPY_TREZOR_MEMPERF", Some("1"));
}
- if cfg!(feature = "n4w1") {
- lib.add_define("USE_N4W1", Some("1"));
+ if cfg!(feature = "n1w1") {
+ lib.add_define("USE_N1W1", Some("1"));
}
lib.add_define(
@@ -940,7 +940,7 @@ impl<'a> MpyBuilder<'a> {
let emulator = py_bool(cfg!(feature = "emulator"));
let haptic = py_bool(cfg!(feature = "haptic"));
let mcu_attestation = py_bool(cfg!(feature = "mcu_attestation"));
- let n4w1 = py_bool(cfg!(feature = "n4w1"));
+ let n1w1 = py_bool(cfg!(feature = "n1w1"));
let optiga = py_bool(cfg!(feature = "optiga"));
let power_manager = py_bool(cfg!(feature = "power_manager"));
let rgb_led = py_bool(cfg!(feature = "rgb_led"));
@@ -963,7 +963,7 @@ impl<'a> MpyBuilder<'a> {
format!(r"s/utils\.USE_BLE/{ble}/g"),
format!(r"s/utils\.USE_BUTTON/{button}/g"),
format!(r"s/utils\.USE_HAPTIC/{haptic}/g"),
- format!(r"s/utils\.USE_N4W1/{n4w1}/g"),
+ format!(r"s/utils\.USE_N1W1/{n1w1}/g"),
format!(r"s/utils\.USE_MCU_ATTESTATION/{mcu_attestation}/g"),
format!(r"s/utils\.USE_OPTIGA/{optiga}/g"),
format!(r"s/utils\.USE_POWER_MANAGER/{power_manager}/g"),
@@ -1126,7 +1126,7 @@ impl<'a> MpyBuilder<'a> {
files.add(src, "apps/debug/*.py")?;
if current_model != "T3W1" {
- files.remove(src, "apps/debug/n4w1_mock.py");
+ files.remove(src, "apps/debug/n1w1_mock.py");
}
}
### core/embed/upymod/modtrezorutils/modtrezorutils.c
@@ -846,8 +846,8 @@ static const mp_obj_tuple_t mod_trezorutils_version_obj = {
/// """Whether the firmware supports loading 3rd-party applications."""
/// USE_TELEMETRY: bool
/// """Whether a telemetry is supported."""
-/// USE_N4W1: bool
-/// """Whether N4W1 is supported."""
+/// USE_N1W1: bool
+/// """Whether N1W1 is supported."""
/// MODEL: str
/// """Model name."""
/// MODEL_FULL_NAME: str
@@ -970,10 +970,10 @@ static const mp_rom_map_elem_t mp_module_trezorutils_globals_table[] = {
#else
{MP_ROM_QSTR(MP_QSTR_USE_SERIAL_NUMBER), mp_const_false},
#endif
-#if USE_N4W1
- {MP_ROM_QSTR(MP_QSTR_USE_N4W1), mp_const_true},
+#if USE_N1W1
+ {MP_ROM_QSTR(MP_QSTR_USE_N1W1), mp_const_true},
#else
- {MP_ROM_QSTR(MP_QSTR_USE_N4W1), mp_const_false},
+ {MP_ROM_QSTR(MP_QSTR_USE_N1W1), mp_const_false},
#endif
#if !PYOPT
#if LOG_STACK_USAGE
### core/embed/upymod/qstrdefsport.h
@@ -855,10 +855,10 @@ Q(DebugWaitType)
Q(__main__)
Q(apps.debug)
Q(apps.debug.load_device)
-Q(apps.debug.n4w1_mock)
+Q(apps.debug.n1w1_mock)
Q(debug)
Q(load_device)
-Q(n4w1_mock)
+Q(n1w1_mock)
Q(prof)
Q(prof.__main__)
Q(storage.debug)
### core/embed/xtask/src/options.rs
@@ -198,9 +198,9 @@ build_options! {
#[arg(long, num_args = 0..=1, default_missing_value = "true")]
map debug_link: bool,
- /// Enable N4W1 support
+ /// Enable N1W1 support
#[arg(long, num_args = 0..=1, default_missing_value = "true")]
- map n4w1: bool,
+ map n1w1: bool,
/// Disable UI animations
#[arg(long, num_args = 0..=1, default_missing_value = "true")]
### core/embed/xtask/tbench/manifest.yaml
@@ -154,9 +154,9 @@ options:
when: component(firmware)
type: checkbox
- - id: n4w1
- name: N4W1 Support
- description: Enables N4W1 support.
+ - id: n1w1
+ name: N1W1 Support
+ description: Enables N1W1 support.
group: Features
when: component(firmware)
type: checkbox
### core/mocks/generated/trezorutils.pyi
@@ -288,8 +288,8 @@ USE_APP_LOADING: bool
"""Whether the firmware supports loading 3rd-party applications."""
USE_TELEMETRY: bool
"""Whether a telemetry is supported."""
-USE_N4W1: bool
-"""Whether N4W1 is supported."""
+USE_N1W1: bool
+"""Whether N1W1 is supported."""
MODEL: str
"""Model name."""
MODEL_FULL_NAME: str
### core/mocks/trezortranslate_keys.pyi
@@ -53,7 +53,7 @@ class TR:
backup__title_skip: str = "Skip backup"
backup__type_create: str = "Select the type of wallet backup you want to create."
backup__type_have: str = "Which type of wallet backup do you have?"
- backup__type_n4w1: str = "N4W1 backup"
+ backup__type_n1w1: str = "N1W1 backup"
backup__type_wordlist: str = "Wordlist backup"
backup__want_to_skip: str = "Are you sure you want to skip the backup?"
bitcoin__commitment_data: str = "Commitment data"
@@ -540,17 +540,17 @@ class TR:
monero__wanna_export_watchkey: str = "Do you really want to export watch-only credentials?"
monero__wanna_start_refresh: str = "Do you really want to\nstart refresh?"
monero__wanna_sync_key_images: str = "Do you really want to\nsync key images?"
- n4w1__err_damaged: str = "This tag is damaged. Continue to try again or scan the next tag."
- n4w1__err_empty: str = "This tag is empty. Continue to scan a different tag."
- n4w1__err_nonempty: str = "Non-empty N4W1 tag."
- n4w1__footer_first: str = "Start with any tag"
- n4w1__footer_last: str = "Use the last remaining tag"
- n4w1__footer_next: str = "Use any remaining tag"
- n4w1__hold_first: str = "Hold the first tag to the back of this Trezor."
- n4w1__hold_last: str = "Hold the last tag to the back of this Trezor."
- n4w1__hold_next: str = "Hold the next tag to the back of this Trezor."
- n4w1__reading: str = "Reading tag..."
- n4w1__writing: str = "Writing to tag..."
+ n1w1__err_damaged: str = "This tag is damaged. Continue to try again or scan the next tag."
+ n1w1__err_empty: str = "This tag is empty. Continue to scan a different tag."
+ n1w1__err_nonempty: str = "Non-empty N1W1 tag."
+ n1w1__footer_first: str = "Start with any tag"
+ n1w1__footer_last: str = "Use the last remaining tag"
+ n1w1__footer_next: str = "Use any remaining tag"
+ n1w1__hold_first: str = "Hold the first tag to the back of this Trezor."
+ n1w1__hold_last: str = "Hold the last tag to the back of this Trezor."
+ n1w1__hold_next: str = "Hold the next tag to the back of this Trezor."
+ n1w1__reading: str = "Reading tag..."
+ n1w1__writing: str = "Writing to tag..."
nem__absolute: str = "absolute"
nem__activate: str = "Activate"
nem__add: str = "Add"
### core/src/apps/base.py
@@ -166,8 +166,8 @@ def get_features() -> Features:
if utils.INTERNAL_MODEL == "T3W1": # TODO utils.USE_NFC
f.capabilities.append(Capability.NFC)
- if utils.USE_N4W1:
- f.capabilities.append(Capability.N4W1)
+ if utils.USE_N1W1:
+ f.capabilities.append(Capability.N1W1)
# Only some models are capable of SD card
if utils.USE_SD_CARD:
### core/src/apps/debug/__init__.py
@@ -27,7 +27,7 @@
DebugLinkGetGcInfo,
DebugLinkGetPairingInfo,
DebugLinkGetState,
- DebugLinkN4W1Connected,
+ DebugLinkN1W1Connected,
DebugLinkOptigaSetSecMax,
DebugLinkPairingInfo,
DebugLinkRecordScreen,
@@ -479,11 +479,11 @@ async def dispatch_WipeDevice(msg: WipeDevice) -> None:
finally:
raise RestartEventLoop
- if utils.USE_N4W1:
+ if utils.USE_N1W1:
- async def dispatch_DebugLinkConnected(msg: DebugLinkN4W1Connected) -> Success:
- """Exchange a sequence of N4W1 messages."""
- from .n4w1_mock import ctx
+ async def dispatch_DebugLinkConnected(msg: DebugLinkN1W1Connected) -> Success:
+ """Exchange a sequence of N1W1 messages."""
+ from .n1w1_mock import ctx
assert DEBUG_CONTEXT is not None
await ctx.handle(DEBUG_CONTEXT)
@@ -608,8 +608,8 @@ async def handle_session(iface: WireInterface) -> None:
MessageType.WipeDevice: dispatch_WipeDevice,
}
- if utils.USE_N4W1:
- WORKFLOW_HANDLERS[MessageType.DebugLinkN4W1Connected] = (
+ if utils.USE_N1W1:
+ WORKFLOW_HANDLERS[MessageType.DebugLinkN1W1Connected] = (
dispatch_DebugLinkConnected
)
### core/src/apps/debug/n1w1_mock.py
@@ -1,7 +1,7 @@
from typing import TYPE_CHECKING
from trezor import log, loop
-from trezor.messages import DebugLinkN4W1Read, DebugLinkN4W1Response, DebugLinkN4W1Write
+from trezor.messages import DebugLinkN1W1Read, DebugLinkN1W1Response, DebugLinkN1W1Write
from trezor.ui import Layout
if TYPE_CHECKING:
@@ -11,66 +11,66 @@
from trezor.wire.context import Context
from typing_extensions import Self
- DebugLinkN4W1Request = DebugLinkN4W1Read | DebugLinkN4W1Write
+ DebugLinkN1W1Request = DebugLinkN1W1Read | DebugLinkN1W1Write
-class N4W1Context:
+class N1W1Context:
def __init__(self) -> None:
- self.tx: loop.mailbox[DebugLinkN4W1Request | None] = loop.mailbox()
- self.rx: loop.mailbox[DebugLinkN4W1Response] = loop.mailbox()
+ self.tx: loop.mailbox[DebugLinkN1W1Request | None] = loop.mailbox()
+ self.rx: loop.mailbox[DebugLinkN1W1Response] = loop.mailbox()
- # Invoked by the application (to communicate via N4W1)
+ # Invoked by the application (to communicate via N1W1)
def __enter__(self) -> Self:
- log.debug(__name__, "N4W1 exchange start")
+ log.debug(__name__, "N1W1 exchange start")
return self
def __exit__(self, exc_type: Any, exc_val: Any, tb: Any) -> None:
- log.debug(__name__, "N4W1 exchange done")
+ log.debug(__name__, "N1W1 exchange done")
self.tx.put(None)
async def connect(self) -> None:
- """Wait for N4W1 connection notification."""
+ """Wait for N1W1 connection notification."""
res = await self.rx
assert res.value is None
async def read(self, key: str) -> AnyBytes | None:
- """Read a specific entry from N4W1."""
- log.debug(__name__, "N4W1 read: %s", key)
- self.tx.put(DebugLinkN4W1Read(key=key))
- # blocks until N4W1 connection + response
+ """Read a specific entry from N1W1."""
+ log.debug(__name__, "N1W1 read: %s", key)
+ self.tx.put(DebugLinkN1W1Read(key=key))
+ # blocks until N1W1 connection + response
resp = await self.rx
- log.debug(__name__, "N4W1 response: %s", resp.value)
+ log.debug(__name__, "N1W1 response: %s", resp.value)
return resp.value
async def write(self, key: str, value: AnyBytes | None) -> AnyBytes | None:
- """Write/delete a specific entry from N4W1."""
- log.debug(__name__, "N4W1 write: %s %s", key, value)
- self.tx.put(DebugLinkN4W1Write(key=key, value=value))
- # blocks until N4W1 connection + response
+ """Write/delete a specific entry from N1W1."""
+ log.debug(__name__, "N1W1 write: %s %s", key, value)
+ self.tx.put(DebugLinkN1W1Write(key=key, value=value))
+ # blocks until N1W1 connection + response
resp = await self.rx
- log.debug(__name__, "N4W1 response: %s", resp.value)
+ log.debug(__name__, "N1W1 response: %s", resp.value)
return resp.value
- # Invoked to communicate with N4W1 emulator over apps.debug.DEBUG_CONTEXT
+ # Invoked to communicate with N1W1 emulator over apps.debug.DEBUG_CONTEXT
async def handle(self, ctx: Context) -> None:
"""Called from `apps.debug.dispatch_DebugLinkConnected()`."""
- self.rx.put(DebugLinkN4W1Response(value=None)) # notify `self.connect()`
+ self.rx.put(DebugLinkN1W1Response(value=None)) # notify `self.connect()`
while (req := await self.tx) is not None:
- res = await ctx.call(req, DebugLinkN4W1Response)
+ res = await ctx.call(req, DebugLinkN1W1Response)
self.rx.put(res)
async def confirm_connect(
self, *, title: str, description: str, button: str, br_name: str | None
) -> None:
- """Show a layout waiting for N4W1 connection, allowing cancellation."""
+ """Show a layout waiting for N1W1 connection, allowing cancellation."""
from trezor import TR
from trezor.ui.layouts.menu import Menu, confirm_with_menu
from trezorui_api import show_info
- self_ctx: N4W1Context = self
+ self_ctx: N1W1Context = self
class _Connect(Layout):
@@ -79,7 +79,7 @@ def create_tasks(self) -> Iterator[loop.Task[None]]:
from trezorui_api import CONFIRMED
async def _task() -> None:
- await self_ctx.connect() # blocks until N4W1 is connected.
+ await self_ctx.connect() # blocks until N1W1 is connected.
try:
# emitting a message raises Shutdown exception
self._emit_message(CONFIRMED)
@@ -103,4 +103,4 @@ async def _task() -> None:
)
-ctx = N4W1Context()
+ctx = N1W1Context()
### core/src/apps/management/recovery_device/layout.py
@@ -278,7 +278,7 @@ async def request_mnemonic(self) -> str | None:
return None
-if not utils.USE_N4W1:
+if not utils.USE_N1W1:
async def choose_handler(method: BackupMethod | None) -> type[RecoveryHandler]:
@@ -305,8 +305,8 @@ async def choose_handler(method: BackupMethod | None) -> type[RecoveryHandler]:
method = await choose_method(TR.recovery__title, TR.backup__type_have)
- if method is BackupMethod.N4W1:
- return _N4W1Handler
+ if method is BackupMethod.N1W1:
+ return _N1W1Handler
if method not in (None, BackupMethod.Display):
from trezor import log
@@ -321,30 +321,30 @@ def __init__(self, msg: str) -> None:
self.msg = msg
async def _read_share() -> str:
- from apps.debug import n4w1_mock
+ from apps.debug import n1w1_mock
- with n4w1_mock.ctx as ctx:
+ with n1w1_mock.ctx as ctx:
# returns `None` on cancellation or retriable error.
await ctx.confirm_connect(
title=TR.recovery__title,
- description=TR.n4w1__hold_next,
- button=TR.n4w1__footer_next,
+ description=TR.n1w1__hold_next,
+ button=TR.n1w1__footer_next,
br_name="backup_read",
)
- # continue N4W1 communication (the tag is connected)
+ # continue N1W1 communication (the tag is connected)
- # TODO(N4W1): animate during read?
+ # TODO(N1W1): animate during read?
if (blob := await ctx.read(key="mnemonic")) is None:
- raise RetryRead(TR.n4w1__err_empty)
+ raise RetryRead(TR.n1w1__err_empty)
- # TODO(N4W1): use protobuf?
+ # TODO(N1W1): use protobuf?
blob = bytes(blob)
try:
return blob.decode()
except ValueError:
- raise RetryRead(TR.n4w1__err_damaged)
+ raise RetryRead(TR.n1w1__err_damaged)
- class _N4W1Handler:
+ class _N1W1Handler:
def __init__(
self,
recovery_type: RecoveryType,
@@ -383,7 +383,7 @@ async def request_mnemonic(self) -> str | None:
danger=True,
) as layout:
await raise_if_not_confirmed(layout, br_name="recovery_retry")
- # wait for a new N4W1 tag
+ # wait for a new N1W1 tag
continue
return await self.check_words(share)
@@ -397,7 +397,7 @@ async def check_words(self, share: str) -> str | None:
backup_type = self.slip39_state and self.slip39_state[1]
share_words = share.split(" ")
- progress_obj = progress(description=TR.n4w1__reading)
+ progress_obj = progress(description=TR.n1w1__reading)
progress_obj.start()
try:
### core/src/apps/management/reset_device/layout.py
@@ -199,7 +199,7 @@ async def _backup_share(self, share: ShareInfo) -> None:
async def choose_backup_handler(method: BackupMethod | None) -> BackupHandler:
from trezor.enums import BackupMethod
- if utils.USE_N4W1:
+ if utils.USE_N1W1:
if method is None:
from trezor.ui.layouts.recovery import choose_method
@@ -208,8 +208,8 @@ async def choose_backup_handler(method: BackupMethod | None) -> BackupHandler:
TR.backup__type_create,
)
- if method is BackupMethod.N4W1:
- return _N4W1Backup()
+ if method is BackupMethod.N1W1:
+ return _N1W1Backup()
if method not in (None, BackupMethod.Display):
from trezor import log
@@ -220,48 +220,48 @@ async def choose_backup_handler(method: BackupMethod | None) -> BackupHandler:
return _DisplayBackup()
-if utils.USE_N4W1:
+if utils.USE_N1W1:
from trezor import TR
if TYPE_CHECKING:
from buffer_types import AnyBytes
- from apps.debug.n4w1_mock import N4W1Context
+ from apps.debug.n1w1_mock import N1W1Context
class RetryWrite(Exception):
def __init__(self, msg: str) -> None:
self.msg = msg
- class _N4W1Backup:
+ class _N1W1Backup:
async def intro(self, num_of_words: int | None = None) -> None:
- # TODO(N4W1): design/copy
+ # TODO(N1W1): design/copy
pass
async def backup(self, iter_shares: Iterable[ShareInfo]) -> None:
- # TODO(N4W1): warn user about safety
+ # TODO(N1W1): warn user about safety
# backup all shares
for share in iter_shares:
await self._backup_share(share)
async def _backup_share(self, share: ShareInfo) -> None:
- from apps.debug import n4w1_mock
+ from apps.debug import n1w1_mock
- # TODO(N4W1): use protobuf?
+ # TODO(N1W1): use protobuf?
blob = " ".join(share.words).encode()
if share.index == 0 or share.num_of_shares is None:
- description, button = TR.n4w1__hold_first, TR.n4w1__footer_first
+ description, button = TR.n1w1__hold_first, TR.n1w1__footer_first
elif share.index == share.num_of_shares - 1:
- description, button = TR.n4w1__hold_last, TR.n4w1__footer_last
+ description, button = TR.n1w1__hold_last, TR.n1w1__footer_last
else:
- description, button = TR.n4w1__hold_next, TR.n4w1__footer_next
+ description, button = TR.n1w1__hold_next, TR.n1w1__footer_next
while True:
try:
- with n4w1_mock.ctx as ctx:
+ with n1w1_mock.ctx as ctx:
return await _write_share(ctx, description, button, blob)
except RetryWrite as exc:
import trezorui_api
@@ -274,11 +274,11 @@ async def _backup_share(self, share: ShareInfo) -> None:
danger=True,
) as layout:
await raise_if_not_confirmed(layout, br_name="backup_retry")
- # wait for a new N4W1 tag
+ # wait for a new N1W1 tag
continue
async def _write_share(
- ctx: N4W1Context, description: str, button: str, blob: AnyBytes
+ ctx: N1W1Context, description: str, button: str, blob: AnyBytes
) -> None:
from trezor.ui.layouts.progress import progress
@@ -288,17 +288,17 @@ async def _write_share(
button=button,
br_name="backup_write",
)
- # continue N4W1 communication (the tag is connected)
+ # continue N1W1 communication (the tag is connected)
result = await ctx.read(key="mnemonic")
if result is not None:
- raise RetryWrite(TR.n4w1__err_nonempty)
+ raise RetryWrite(TR.n1w1__err_nonempty)
- progress_obj = progress(description=TR.n4w1__writing)
+ progress_obj = progress(description=TR.n1w1__writing)
progress_obj.start()
progress_obj.report(100)
try:
await ctx.write(key="mnemonic", value=blob)
- # TODO(N4W1): animate during I/O?
+ # TODO(N1W1): animate during I/O?
progress_obj.report(1000)
finally:
progress_obj.stop()
### core/src/trezor/enums/BackupMethod.py
@@ -3,4 +3,4 @@
# isort:skip_file
Display = 0
-N4W1 = 1
+N1W1 = 1
### core/src/trezor/enums/Capability.py
@@ -14,7 +14,7 @@
Haptic = 21
BLE = 22
NFC = 23
-N4W1 = 25
+N1W1 = 25
TouchWakeup = 26
if not utils.BITCOIN_ONLY:
Bitcoin_like = 2
### core/src/trezor/enums/MessageType.py
@@ -125,10 +125,10 @@
DebugLinkGetPairingInfo = 9011
DebugLinkPairingInfo = 9012
DebugLinkSetLogFilter = 9013
- DebugLinkN4W1Connected = 9014
- DebugLinkN4W1Write = 9015
- DebugLinkN4W1Read = 9016
- DebugLinkN4W1Response = 9017
+ DebugLinkN1W1Connected = 9014
+ DebugLinkN1W1Write = 9015
+ DebugLinkN1W1Read = 9016
+ DebugLinkN1W1Response = 9017
DebugLinkSetBatteryState = 9018
if utils.USE_THP:
ThpCreateNewSession = 1000
### core/src/trezor/enums/__init__.py
@@ -181,7 +181,7 @@ class BackupType(IntEnum):
class BackupMethod(IntEnum):
Display = 0
- N4W1 = 1
+ N1W1 = 1
class SafetyCheckLevel(IntEnum):
Strict = 0
@@ -239,7 +239,7 @@ class Capability(IntEnum):
BLE = 22
NFC = 23
Tron = 24
- N4W1 = 25
+ N1W1 = 25
TouchWakeup = 26
class SdProtectOperationType(IntEnum):
@@ -583,10 +583,10 @@ class MessageType(IntEnum):
DebugLinkGetPairingInfo = 9011
DebugLinkPairingInfo = 9012
DebugLinkSetLogFilter = 9013
- DebugLinkN4W1Connected = 9014
- DebugLinkN4W1Write = 9015
- DebugLinkN4W1Read = 9016
- DebugLinkN4W1Response = 9017
+ DebugLinkN1W1Connected = 9014
+ DebugLinkN1W1Write = 9015
+ DebugLinkN1W1Read = 9016
+ DebugLinkN1W1Response = 9017
DebugLinkSetBatteryState = 9018
EthereumGetPublicKey = 450
EthereumPublicKey = 451
### core/src/trezor/messages.py
@@ -3209,13 +3209,13 @@ def __init__(
def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkSetLogFilter"]:
return isinstance(msg, cls)
- class DebugLinkN4W1Connected(protobuf.MessageType):
+ class DebugLinkN1W1Connected(protobuf.MessageType):
@classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkN4W1Connected"]:
+ def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkN1W1Connected"]:
return isinstance(msg, cls)
- class DebugLinkN4W1Write(protobuf.MessageType):
+ class DebugLinkN1W1Write(protobuf.MessageType):
key: "str | None"
value: "AnyBytes | None"
@@ -3228,10 +3228,10 @@ def __init__(
pass
@classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkN4W1Write"]:
+ def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkN1W1Write"]:
return isinstance(msg, cls)
- class DebugLinkN4W1Read(protobuf.MessageType):
+ class DebugLinkN1W1Read(protobuf.MessageType):
key: "str | None"
def __init__(
@@ -3242,10 +3242,10 @@ def __init__(
pass
@classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkN4W1Read"]:
+ def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkN1W1Read"]:
return isinstance(msg, cls)
- class DebugLinkN4W1Response(protobuf.MessageType):
+ class DebugLinkN1W1Response(protobuf.MessageType):
value: "AnyBytes | None"
def __init__(
@@ -3256,7 +3256,7 @@ def __init__(
pass
@classmethod
- def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkN4W1Response"]:
+ def is_type_of(cls, msg: Any) -> TypeGuard["DebugLinkN1W1Response"]:
return isinstance(msg, cls)
class DebugLinkGcInfoItem(protobuf.MessageType):
### core/src/trezor/ui/layouts/eckhart/recovery.py
@@ -213,7 +213,7 @@ async def show_dry_run_result(result: bool, is_slip39: bool) -> None:
)
-if utils.USE_N4W1:
+if utils.USE_N1W1:
async def choose_method(title: str, description: str) -> BackupMethod:
import trezorui_api
@@ -222,7 +222,7 @@ async def choose_method(title: str, description: str) -> BackupMethod:
with trezorui_api.select_word(
title=title,
description=description,
- words=(TR.backup__type_n4w1, TR.backup__type_wordlist, ""),
+ words=(TR.backup__type_n1w1, TR.backup__type_wordlist, ""),
) as layout:
index = await interact(layout, br_name="choose_method")
- return (BackupMethod.N4W1, BackupMethod.Display)[index]
+ return (BackupMethod.N1W1, BackupMethod.Display)[index]
### core/src/trezor/utils.py
@@ -28,7 +28,7 @@
USE_DBG_CONSOLE,
USE_HAPTIC,
USE_MCU_ATTESTATION,
- USE_N4W1,
+ USE_N1W1,
USE_NRF,
USE_OPTIGA,
USE_POWER_MANAGER,
### core/tools/n1w1-emu.py
@@ -6,10 +6,10 @@
from trezorlib.debuglink import DebugLink
from trezorlib.messages import (
- DebugLinkN4W1Connected,
- DebugLinkN4W1Read,
- DebugLinkN4W1Response,
- DebugLinkN4W1Write,
+ DebugLinkN1W1Connected,
+ DebugLinkN1W1Read,
+ DebugLinkN1W1Response,
+ DebugLinkN1W1Write,
Success,
)
from trezorlib.transport.udp import UdpTransport
@@ -25,7 +25,7 @@ def cli() -> None:
@click.argument("device_path")
@click.argument("db_file")
def run(device_path: str, db_file: str) -> None:
- """Run basic N4W1 emulator over DebugLink transport."""
+ """Run basic N1W1 emulator over DebugLink transport."""
with dbm.open(db_file, "c") as db:
for k, v in db.items():
print(f"{k} => {v}")
@@ -42,11 +42,11 @@ def run(device_path: str, db_file: str) -> None:
transport = UdpTransport(device_path)
debug = DebugLink(transport)
- req = debug._call(DebugLinkN4W1Connected())
+ req = debug._call(DebugLinkN1W1Connected())
while not isinstance(req, Success):
print(req)
value = None
- if isinstance(req, DebugLinkN4W1Write):
+ if isinstance(req, DebugLinkN1W1Write):
if req.key is not None:
# fetch the existing item
value = db.get(req.key, None)
@@ -55,13 +55,13 @@ def run(device_path: str, db_file: str) -> None:
db[req.key] = req.value
elif value is not None:
del db[req.key]
- elif isinstance(req, DebugLinkN4W1Read):
+ elif isinstance(req, DebugLinkN1W1Read):
if req.key is not None:
value = db.get(req.key, None)
else:
raise NotImplementedError(req)
- resp = DebugLinkN4W1Response(value=value)
+ resp = DebugLinkN1W1Response(value=value)
print(resp)
req = debug._call(resp)
### core/translations/cs.json
@@ -197,7 +197,7 @@
},
"backup__type_create": "",
"backup__type_have": "",
- "backup__type_n4w1": "",
+ "backup__type_n1w1": "",
"backup__type_wordlist": "",
"backup__want_to_skip": {
"Bolt": "Určitě chcete přeskočit zálohování?",
@@ -1414,17 +1414,17 @@
"monero__wanna_export_watchkey": "Opravdu chcete exportovat údaje pouze pro sledování?",
"monero__wanna_start_refresh": "Opravdu chcete zahájit\nobnovení?",
"monero__wanna_sync_key_images": "Opravdu chcete\nsynchronizovat obrazy klíče?",
- "n4w1__err_damaged": "",
- "n4w1__err_empty": "",
- "n4w1__err_nonempty": "",
- "n4w1__footer_first": "",
- "n4w1__footer_last": "",
- "n4w1__footer_next": "",
- "n4w1__hold_first": "",
- "n4w1__hold_last": "",
- "n4w1__hold_next": "",
- "n4w1__reading": "",
- "n4w1__writing": "",
+ "n1w1__err_damaged": "",
+ "n1w1__err_empty": "",
+ "n1w1__err_nonempty": "",
+ "n1w1__footer_first": "",
+ "n1w1__footer_last": "",
+ "n1w1__footer_next": "",
+ "n1w1__hold_first": "",
+ "n1w1__hold_last": "",
+ "n1w1__hold_next": "",
+ "n1w1__reading": "",
+ "n1w1__writing": "",
"nem__absolute": {
"Bolt": "absolutní",
"Caesar": "",
### core/translations/de.json
@@ -207,7 +207,7 @@
},
"backup__type_create": "",
"backup__type_have": "",
- "backup__type_n4w1": "",
+ "backup__type_n1w1": "",
"backup__type_wordlist": "",
"backup__want_to_skip": {
"Bolt": "Möchtest du das Backup wirklich überspringen?",
@@ -1649,17 +1649,17 @@
"monero__wanna_export_watchkey": "Möchtest du wirklich Watch-Only-Daten exportieren?",
"monero__wanna_start_refresh": "Möchtest du wirklich\ndie Aktualisierung starten?",
"monero__wanna_sync_key_images": "Möchtest du wirklich\ndie Key-Images synchronisieren?",
- "n4w1__err_damaged": "",
- "n4w1__err_empty": "",
- "n4w1__err_nonempty": "",
- "n4w1__footer_first": "",
- "n4w1__footer_last": "",
- "n4w1__footer_next": "",
- "n4w1__hold_first": "",
- "n4w1__hold_last": "",
- "n4w1__hold_next": "",
- "n4w1__reading": "",
- "n4w1__writing": "",
+ "n1w1__err_damaged": "",
+ "n1w1__err_empty": "",
+ "n1w1__err_nonempty": "",
+ "n1w1__footer_first": "",
+ "n1w1__footer_last": "",
+ "n1w1__footer_next": "",
+ "n1w1__hold_first": "",
+ "n1w1__hold_last": "",
+ "n1w1__hold_next": "",
+ "n1w1__reading": "",
+ "n1w1__writing": "",
"nem__absolute": {
"Bolt": "absolut",
"Caesar": "",
### core/translations/en.json
@@ -175,11 +175,11 @@
"Delizia": "",
"Eckhart": "Which type of wallet backup do you have?"
},
- "backup__type_n4w1": {
+ "backup__type_n1w1": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
- "Eckhart": "N4W1 backup"
+ "Eckhart": "N1W1 backup"
},
"backup__type_wordlist": {
"Bolt": "",
@@ -1392,67 +1392,67 @@
"monero__wanna_export_watchkey": "Do you really want to export watch-only credentials?",
"monero__wanna_start_refresh": "Do you really want to\nstart refresh?",
"monero__wanna_sync_key_images": "Do you really want to\nsync key images?",
- "n4w1__err_damaged": {
+ "n1w1__err_damaged": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "This tag is damaged. Continue to try again or scan the next tag."
},
- "n4w1__err_empty": {
+ "n1w1__err_empty": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "This tag is empty. Continue to scan a different tag."
},
- "n4w1__err_nonempty": {
+ "n1w1__err_nonempty": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
- "Eckhart": "Non-empty N4W1 tag."
+ "Eckhart": "Non-empty N1W1 tag."
},
- "n4w1__footer_first": {
+ "n1w1__footer_first": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "Start with any tag"
},
- "n4w1__footer_last": {
+ "n1w1__footer_last": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "Use the last remaining tag"
},
- "n4w1__footer_next": {
+ "n1w1__footer_next": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "Use any remaining tag"
},
- "n4w1__hold_first": {
+ "n1w1__hold_first": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "Hold the first tag to the back of this Trezor."
},
- "n4w1__hold_last": {
+ "n1w1__hold_last": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "Hold the last tag to the back of this Trezor."
},
- "n4w1__hold_next": {
+ "n1w1__hold_next": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "Hold the next tag to the back of this Trezor."
},
- "n4w1__reading": {
+ "n1w1__reading": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
"Eckhart": "Reading tag..."
},
- "n4w1__writing": {
+ "n1w1__writing": {
"Bolt": "",
"Caesar": "",
"Delizia": "",
### core/translations/es.json
@@ -202,7 +202,7 @@
},
"backup__type_create": "",
"backup__type_have": "",
- "backup__type_n4w1": "",
+ "backup__type_n1w1": "",
"backup__type_wordlist": "",
"backup__want_to_skip": {
"Bolt": "¿Quieres omitir la copia de seguridad?",
@@ -1434,17 +1434,17 @@
"monero__wanna_export_watchkey": "¿Quieres exportar las credenciales de solo lectura?",
"monero__wanna_start_refresh": "¿Quieres iniciar \nla actualización?",
"monero__wanna_sync_key_images": "¿Quieres\nsincronizar imágenes clave?",
- "n4w1__err_damaged": "",
- "n4w1__err_empty": "",
- "n4w1__err_nonempty": "",
- "n4w1__footer_first": "",
- "n4w1__footer_last": "",
- "n4w1__footer_next": "",
- "n4w1__hold_first": "",
- "n4w1__hold_last": "",
- "n4w1__hold_next": "",
- "n4w1__reading": "",
- "n4w1__writing": "",
+ "n1w1__err_damaged": "",
+ "n1w1__err_empty": "",
+ "n1w1__err_nonempty": "",
+ "n1w1__footer_first": "",
+ "n1w1__footer_last": "",
+ "n1w1__footer_next": "",
+ "n1w1__hold_first": "",
+ "n1w1__hold_last": "",
+ "n1w1__hold_next": "",
+ "n1w1__reading": "",
+ "n1w1__writing": "",
"nem__absolute": {
"Bolt": "absoluto",
"Caesar": "",
### core/translations/fr.json
@@ -232,7 +232,7 @@
},
"backup__type_create": "",
"backup__type_have": "",
- "backup__type_n4w1": "",
+ "backup__type_n1w1": "",
"backup__type_wordlist": "",
"backup__want_to_skip": {
"Bolt": "Voulez-vous vraiment ignorer la sauvegarde ?",
@@ -1599,17 +1599,17 @@
"monero__wanna_export_watchkey": "Voulez-vous vraiment exporter les identifiants en lecture seule ?",
"monero__wanna_start_refresh": "Voulez-vous vraiment\ndémarrer l'actualisation ?",
"monero__wanna_sync_key_images": "Voulez-vous vraiment\nsynchroniser les images clés ?",
- "n4w1__err_damaged": "",
- "n4w1__err_empty": "",
- "n4w1__err_nonempty": "",
- "n4w1__footer_first": "",
- "n4w1__footer_last": "",
- "n4w1__footer_next": "",
- "n4w1__hold_first": "",
- "n4w1__hold_last": "",
- "n4w1__hold_next": "",
- "n4w1__reading": "",
- "n4w1__writing": "",
+ "n1w1__err_damaged": "",
+ "n1w1__err_empty": "",
+ "n1w1__err_nonempty": "",
+ "n1w1__footer_first": "",
+ "n1w1__footer_last": "",
+ "n1w1__footer_next": "",
+ "n1w1__hold_first": "",
+ "n1w1__hold_last": "",
+ "n1w1__hold_next": "",
+ "n1w1__reading": "",
+ "n1w1__writing": "",
"nem__absolute": {
"Bolt": "absolu(e)(s)",
"Caesar": "",
### core/translations/order.json
@@ -1185,13 +1185,13 @@
"1183": "ethereum__confirm_contract",
"1184": "words__intent",
"1185": "suite_sync__rotate_key",
- "1186": "n4w1__footer_first",
- "1187": "n4w1__footer_last",
- "1188": "n4w1__footer_next",
- "1189": "n4w1__hold_first",
- "1190": "n4w1__hold_last",
- "1191": "n4w1__hold_next",
- "1192": "n4w1__writing",
+ "1186": "n1w1__footer_first",
+ "1187": "n1w1__footer_last",
+ "1188": "n1w1__footer_next",
+ "1189": "n1w1__hold_first",
+ "1190": "n1w1__hold_last",
+ "1191": "n1w1__hold_next",
+ "1192": "n1w1__writing",
"1193": "ethereum__deposit_amount",
"1194": "ethereum__deposit_to",
"1195": "ethereum__redeem_amount",
@@ -1208,7 +1208,7 @@
"1206": "ethereum__your_address",
"1207": "cardano__credential_intro_template",
"1208": "cardano__key_path",
- "1209": "backup__type_n4w1",
+ "1209": "backup__type_n1w1",
"1210": "backup__type_wordlist",
"1211": "ethereum__title_token_contract",
"1212": "ethereum__redeem",
@@ -1221,10 +1221,10 @@
"1219": "ethereum__calldata_suffix",
"1220": "backup__type_create",
"1221": "backup__type_have",
- "1222": "n4w1__reading",
- "1223": "n4w1__err_empty",
- "1224": "n4w1__err_nonempty",
- "1225": "n4w1__err_damaged",
+ "1222": "n1w1__reading",
+ "1223": "n1w1__err_empty",
+ "1224": "n1w1__err_nonempty",
+ "1225": "n1w1__err_damaged",
"1226": "ripple__account_deletion_warning",
"1227": "ripple__account_to_be_deleted",
"1228": "words__account_deletion",
### core/translations/pt.json
@@ -212,7 +212,7 @@
},
"backup__type_create": "",
"backup__type_have": "",
- "backup__type_n4w1": "",
+ "backup__type_n1w1": "",
"backup__type_wordlist": "",
"backup__want_to_skip": {
"Bolt": "Tem certeza de que deseja pular o backup?",
@@ -1469,17 +1469,17 @@
"monero__wanna_export_watchkey": "Deseja mesmo exportar credenciais de somente exibição?",
"monero__wanna_start_refresh": "Deseja mesmo\niniciar atualização?",
"monero__wanna_sync_key_images": "Deseja mesmo\nsincronizar imagens de chave?",
- "n4w1__err_damaged": "",
- "n4w1__err_empty": "",
- "n4w1__err_nonempty": "",
- "n4w1__footer_first": "",
- "n4w1__footer_last": "",
- "n4w1__footer_next": "",
- "n4w1__hold_first": "",
- "n4w1__hold_last": "",
- "n4w1__hold_next": "",
- "n4w1__reading": "",
- "n4w1__writing": "",
+ "n1w1__err_damaged": "",
+ "n1w1__err_empty": "",
+ "n1w1__err_nonempty": "",
+ "n1w1__footer_first": "",
+ "n1w1__footer_last": "",
+ "n1w1__footer_next": "",
+ "n1w1__hold_first": "",
+ "n1w1__hold_last": "",
+ "n1w1__hold_next": "",
+ "n1w1__reading": "",
+ "n1w1__writing": "",
"nem__absolute": {
"Bolt": "absoluto",
"Caesar": "",
### docs/core/build/xtask.md
@@ -92,7 +92,7 @@ cannot be used bare:
- `--verbose` — verbose cargo output.
- `--xbuild-trace` — log build script progress (executed commands and timings).
- `--apps` — enable external app loading.
-- `--n4w1` — enable N4W1 support.
+- `--n1w1` — enable N1W1 support.
- `--unsafe-fw` — enable unsafe firmware features.
- `--storage-insecure-testing-mode` — insecure storage test mode (forbidden with
`--production`).
### legacy/firmware/protob/Makefile
@@ -8,7 +8,7 @@ SKIPPED_MESSAGES := Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tez
DebugLinkGetPairingInfo DebugLinkPairingInfo DebugLinkGetGcInfo DebugLinkGcInfoItem \
DebugLinkGcInfo DebugLinkRecordScreen DebugLinkEraseSdCard DebugLinkWatchLayout \
DebugLinkLayout DebugLinkResetDebugEvents DebugLinkSetBatteryState \
- DebugLinkN4W1Connected DebugLinkN4W1Read DebugLinkN4W1Write DebugLinkN4W1Response \
+ DebugLinkN1W1Connected DebugLinkN1W1Read DebugLinkN1W1Write DebugLinkN1W1Response \
DebugLinkOptigaSetSecMax DebugLinkSetLogFilter \
GetNonce TxAckInput TxAckOutput TxAckPrev PaymentRequest \
EthereumABITupleInfo EthereumABIValueInfo EthereumERC7730FieldInfo EthereumDisplayFormatInfo EthereumERC7730Path \
### python/src/trezorlib/cli/device.py
@@ -46,7 +46,7 @@
BACKUP_METHOD = {
"display": messages.BackupMethod.Display,
- "n4w1": messages.BackupMethod.N4W1,
+ "n1w1": messages.BackupMethod.N1W1,
}
SD_PROTECT_OPERATIONS = {
### python/src/trezorlib/messages.py
@@ -204,7 +204,7 @@ class BackupType(IntEnum):
class BackupMethod(IntEnum):
Display = 0
- N4W1 = 1
+ N1W1 = 1
class SafetyCheckLevel(IntEnum):
@@ -269,7 +269,7 @@ class Capability(IntEnum):
BLE = 22
NFC = 23
Tron = 24
- N4W1 = 25
+ N1W1 = 25
TouchWakeup = 26
@@ -648,10 +648,10 @@ class MessageType(IntEnum):
DebugLinkGetPairingInfo = 9011
DebugLinkPairingInfo = 9012
DebugLinkSetLogFilter = 9013
- DebugLinkN4W1Connected = 9014
- DebugLinkN4W1Write = 9015
- DebugLinkN4W1Read = 9016
- DebugLinkN4W1Response = 9017
+ DebugLinkN1W1Connected = 9014
+ DebugLinkN1W1Write = 9015
+ DebugLinkN1W1Read = 9016
+ DebugLinkN1W1Response = 9017
DebugLinkSetBatteryState = 9018
EthereumGetPublicKey = 450
EthereumPublicKey = 451
@@ -4656,11 +4656,11 @@ def __init__(
self.filter = filter
-class DebugLinkN4W1Connected(protobuf.MessageType):
+class DebugLinkN1W1Connected(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 9014
-class DebugLinkN4W1Write(protobuf.MessageType):
+class DebugLinkN1W1Write(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 9015
FIELDS = {
1: protobuf.Field("key", "string", repeated=False, required=False, default=None),
@@ -4677,7 +4677,7 @@ def __init__(
self.value = value
-class DebugLinkN4W1Read(protobuf.MessageType):
+class DebugLinkN1W1Read(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 9016
FIELDS = {
1: protobuf.Field("key", "string", repeated=False, required=False, default=None),
@@ -4691,7 +4691,7 @@ def __init__(
self.key = key
-class DebugLinkN4W1Response(protobuf.MessageType):
+class DebugLinkN1W1Response(protobuf.MessageType):
MESSAGE_WIRE_TYPE = 9017
FIELDS = {
1: protobuf.Field("value", "bytes", repeated=False, required=False, default=None),
### rust/trezor-client/src/messages/generated.rs
@@ -93,10 +93,10 @@ trezor_message_impl! {
DebugLinkGetPairingInfo => MessageType_DebugLinkGetPairingInfo,
DebugLinkPairingInfo => MessageType_DebugLinkPairingInfo,
DebugLinkSetLogFilter => MessageType_DebugLinkSetLogFilter,
- DebugLinkN4W1Connected => MessageType_DebugLinkN4W1Connected,
- DebugLinkN4W1Write => MessageType_DebugLinkN4W1Write,
- DebugLinkN4W1Read => MessageType_DebugLinkN4W1Read,
- DebugLinkN4W1Response => MessageType_DebugLinkN4W1Response,
+ DebugLinkN1W1Connected => MessageType_DebugLinkN1W1Connected,
+ DebugLinkN1W1Write => MessageType_DebugLinkN1W1Write,
+ DebugLinkN1W1Read => MessageType_DebugLinkN1W1Read,
+ DebugLinkN1W1Response => MessageType_DebugLinkN1W1Response,
DebugLinkSetBatteryState => MessageType_DebugLinkSetBatteryState,
ThpCreateNewSession => MessageType_ThpCreateNewSession,
ThpCredentialRequest => MessageType_ThpCredentialRequest,
### rust/trezor-client/src/protos/generated/messages.rs
@@ -245,14 +245,14 @@ pub enum MessageType {
MessageType_DebugLinkPairingInfo = 9012,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkSetLogFilter)
MessageType_DebugLinkSetLogFilter = 9013,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkN4W1Connected)
- MessageType_DebugLinkN4W1Connected = 9014,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkN4W1Write)
- MessageType_DebugLinkN4W1Write = 9015,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkN4W1Read)
- MessageType_DebugLinkN4W1Read = 9016,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkN4W1Response)
- MessageType_DebugLinkN4W1Response = 9017,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkN1W1Connected)
+ MessageType_DebugLinkN1W1Connected = 9014,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkN1W1Write)
+ MessageType_DebugLinkN1W1Write = 9015,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkN1W1Read)
+ MessageType_DebugLinkN1W1Read = 9016,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkN1W1Response)
+ MessageType_DebugLinkN1W1Response = 9017,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_DebugLinkSetBatteryState)
MessageType_DebugLinkSetBatteryState = 9018,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.MessageType.MessageType_EthereumGetPublicKey)
@@ -743,10 +743,10 @@ impl ::protobuf::Enum for MessageType {
9011 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkGetPairingInfo),
9012 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkPairingInfo),
9013 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkSetLogFilter),
- 9014 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN4W1Connected),
- 9015 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN4W1Write),
- 9016 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN4W1Read),
- 9017 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN4W1Response),
+ 9014 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN1W1Connected),
+ 9015 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN1W1Write),
+ 9016 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN1W1Read),
+ 9017 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN1W1Response),
9018 => ::std::option::Option::Some(MessageType::MessageType_DebugLinkSetBatteryState),
450 => ::std::option::Option::Some(MessageType::MessageType_EthereumGetPublicKey),
451 => ::std::option::Option::Some(MessageType::MessageType_EthereumPublicKey),
@@ -1047,10 +1047,10 @@ impl ::protobuf::Enum for MessageType {
"MessageType_DebugLinkGetPairingInfo" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkGetPairingInfo),
"MessageType_DebugLinkPairingInfo" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkPairingInfo),
"MessageType_DebugLinkSetLogFilter" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkSetLogFilter),
- "MessageType_DebugLinkN4W1Connected" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN4W1Connected),
- "MessageType_DebugLinkN4W1Write" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN4W1Write),
- "MessageType_DebugLinkN4W1Read" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN4W1Read),
- "MessageType_DebugLinkN4W1Response" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN4W1Response),
+ "MessageType_DebugLinkN1W1Connected" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN1W1Connected),
+ "MessageType_DebugLinkN1W1Write" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN1W1Write),
+ "MessageType_DebugLinkN1W1Read" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN1W1Read),
+ "MessageType_DebugLinkN1W1Response" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkN1W1Response),
"MessageType_DebugLinkSetBatteryState" => ::std::option::Option::Some(MessageType::MessageType_DebugLinkSetBatteryState),
"MessageType_EthereumGetPublicKey" => ::std::option::Option::Some(MessageType::MessageType_EthereumGetPublicKey),
"MessageType_EthereumPublicKey" => ::std::option::Option::Some(MessageType::MessageType_EthereumPublicKey),
@@ -1350,10 +1350,10 @@ impl ::protobuf::Enum for MessageType {
MessageType::MessageType_DebugLinkGetPairingInfo,
MessageType::MessageType_DebugLinkPairingInfo,
MessageType::MessageType_DebugLinkSetLogFilter,
- MessageType::MessageType_DebugLinkN4W1Connected,
- MessageType::MessageType_DebugLinkN4W1Write,
- MessageType::MessageType_DebugLinkN4W1Read,
- MessageType::MessageType_DebugLinkN4W1Response,
+ MessageType::MessageType_DebugLinkN1W1Connected,
+ MessageType::MessageType_DebugLinkN1W1Write,
+ MessageType::MessageType_DebugLinkN1W1Read,
+ MessageType::MessageType_DebugLinkN1W1Response,
MessageType::MessageType_DebugLinkSetBatteryState,
MessageType::MessageType_EthereumGetPublicKey,
MessageType::MessageType_EthereumPublicKey,
@@ -1659,10 +1659,10 @@ impl ::protobuf::EnumFull for MessageType {
MessageType::MessageType_DebugLinkGetPairingInfo => 106,
MessageType::MessageType_DebugLinkPairingInfo => 107,
MessageType::MessageType_DebugLinkSetLogFilter => 108,
- MessageType::MessageType_DebugLinkN4W1Connected => 109,
- MessageType::MessageType_DebugLinkN4W1Write => 110,
- MessageType::MessageType_DebugLinkN4W1Read => 111,
- MessageType::MessageType_DebugLinkN4W1Response => 112,
+ MessageType::MessageType_DebugLinkN1W1Connected => 109,
+ MessageType::MessageType_DebugLinkN1W1Write => 110,
+ MessageType::MessageType_DebugLinkN1W1Read => 111,
+ MessageType::MessageType_DebugLinkN1W1Response => 112,
MessageType::MessageType_DebugLinkSetBatteryState => 113,
MessageType::MessageType_EthereumGetPublicKey => 114,
MessageType::MessageType_EthereumPublicKey => 115,
@@ -1999,11 +1999,11 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x80\xa6\x1d\x01\xa0\xb5\x18\x01\x12/\n\x20MessageType_DebugLinkPairingI\
nfo\x10\xb4F\x1a\x08\x80\xa6\x1d\x01\xa8\xb5\x18\x01\x120\n!MessageType_\
DebugLinkSetLogFilter\x10\xb5F\x1a\x08\x80\xa6\x1d\x01\xa0\xb5\x18\x01\
- \x121\n\"MessageType_DebugLinkN4W1Connected\x10\xb6F\x1a\x08\x80\xa6\x1d\
- \x01\xa0\xb5\x18\x01\x12-\n\x1eMessageType_DebugLinkN4W1Write\x10\xb7F\
+ \x121\n\"MessageType_DebugLinkN1W1Connected\x10\xb6F\x1a\x08\x80\xa6\x1d\
+ \x01\xa0\xb5\x18\x01\x12-\n\x1eMessageType_DebugLinkN1W1Write\x10\xb7F\
\x1a\x08\x80\xa6\x1d\x01\xa8\xb5\x18\x01\x12,\n\x1dMessageType_DebugLink\
- N4W1Read\x10\xb8F\x1a\x08\x80\xa6\x1d\x01\xa8\xb5\x18\x01\x120\n!Message\
- Type_DebugLinkN4W1Response\x10\xb9F\x1a\x08\x80\xa6\x1d\x01\xa0\xb5\x18\
+ N1W1Read\x10\xb8F\x1a\x08\x80\xa6\x1d\x01\xa8\xb5\x18\x01\x120\n!Message\
+ Type_DebugLinkN1W1Response\x10\xb9F\x1a\x08\x80\xa6\x1d\x01\xa0\xb5\x18\
\x01\x123\n$MessageType_DebugLinkSetBatteryState\x10\xbaF\x1a\x08\x80\
\xa6\x1d\x01\xa0\xb5\x18\x01\x12+\n\x20MessageType_EthereumGetPublicKey\
\x10\xc2\x03\x1a\x04\x90\xb5\x18\x01\x12(\n\x1dMessageType_EthereumPubli\
### rust/trezor-client/src/protos/generated/messages_debug.rs
@@ -5352,38 +5352,38 @@ impl ::protobuf::reflect::ProtobufValue for DebugLinkSetLogFilter {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
-// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkN4W1Connected)
+// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkN1W1Connected)
#[derive(PartialEq,Clone,Default,Debug)]
-pub struct DebugLinkN4W1Connected {
+pub struct DebugLinkN1W1Connected {
// special fields
- // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkN4W1Connected.special_fields)
+ // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkN1W1Connected.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
-impl<'a> ::std::default::Default for &'a DebugLinkN4W1Connected {
- fn default() -> &'a DebugLinkN4W1Connected {
- <DebugLinkN4W1Connected as ::protobuf::Message>::default_instance()
+impl<'a> ::std::default::Default for &'a DebugLinkN1W1Connected {
+ fn default() -> &'a DebugLinkN1W1Connected {
+ <DebugLinkN1W1Connected as ::protobuf::Message>::default_instance()
}
}
-impl DebugLinkN4W1Connected {
- pub fn new() -> DebugLinkN4W1Connected {
+impl DebugLinkN1W1Connected {
+ pub fn new() -> DebugLinkN1W1Connected {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(0);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkN4W1Connected>(
- "DebugLinkN4W1Connected",
+ ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkN1W1Connected>(
+ "DebugLinkN1W1Connected",
fields,
oneofs,
)
}
}
-impl ::protobuf::Message for DebugLinkN4W1Connected {
- const NAME: &'static str = "DebugLinkN4W1Connected";
+impl ::protobuf::Message for DebugLinkN1W1Connected {
+ const NAME: &'static str = "DebugLinkN1W1Connected";
fn is_initialized(&self) -> bool {
true
@@ -5422,60 +5422,60 @@ impl ::protobuf::Message for DebugLinkN4W1Connected {
&mut self.special_fields
}
- fn new() -> DebugLinkN4W1Connected {
- DebugLinkN4W1Connected::new()
+ fn new() -> DebugLinkN1W1Connected {
+ DebugLinkN1W1Connected::new()
}
fn clear(&mut self) {
self.special_fields.clear();
}
- fn default_instance() -> &'static DebugLinkN4W1Connected {
- static instance: DebugLinkN4W1Connected = DebugLinkN4W1Connected {
+ fn default_instance() -> &'static DebugLinkN1W1Connected {
+ static instance: DebugLinkN1W1Connected = DebugLinkN1W1Connected {
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
-impl ::protobuf::MessageFull for DebugLinkN4W1Connected {
+impl ::protobuf::MessageFull for DebugLinkN1W1Connected {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkN4W1Connected").unwrap()).clone()
+ descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkN1W1Connected").unwrap()).clone()
}
}
-impl ::std::fmt::Display for DebugLinkN4W1Connected {
+impl ::std::fmt::Display for DebugLinkN1W1Connected {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
-impl ::protobuf::reflect::ProtobufValue for DebugLinkN4W1Connected {
+impl ::protobuf::reflect::ProtobufValue for DebugLinkN1W1Connected {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
-// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkN4W1Write)
+// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkN1W1Write)
#[derive(PartialEq,Clone,Default,Debug)]
-pub struct DebugLinkN4W1Write {
+pub struct DebugLinkN1W1Write {
// message fields
- // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkN4W1Write.key)
+ // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkN1W1Write.key)
pub key: ::std::option::Option<::std::string::String>,
- // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkN4W1Write.value)
+ // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkN1W1Write.value)
pub value: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
- // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkN4W1Write.special_fields)
+ // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkN1W1Write.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
-impl<'a> ::std::default::Default for &'a DebugLinkN4W1Write {
- fn default() -> &'a DebugLinkN4W1Write {
- <DebugLinkN4W1Write as ::protobuf::Message>::default_instance()
+impl<'a> ::std::default::Default for &'a DebugLinkN1W1Write {
+ fn default() -> &'a DebugLinkN1W1Write {
+ <DebugLinkN1W1Write as ::protobuf::Message>::default_instance()
}
}
-impl DebugLinkN4W1Write {
- pub fn new() -> DebugLinkN4W1Write {
+impl DebugLinkN1W1Write {
+ pub fn new() -> DebugLinkN1W1Write {
::std::default::Default::default()
}
@@ -5556,24 +5556,24 @@ impl DebugLinkN4W1Write {
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"key",
- |m: &DebugLinkN4W1Write| { &m.key },
- |m: &mut DebugLinkN4W1Write| { &mut m.key },
+ |m: &DebugLinkN1W1Write| { &m.key },
+ |m: &mut DebugLinkN1W1Write| { &mut m.key },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"value",
- |m: &DebugLinkN4W1Write| { &m.value },
- |m: &mut DebugLinkN4W1Write| { &mut m.value },
+ |m: &DebugLinkN1W1Write| { &m.value },
+ |m: &mut DebugLinkN1W1Write| { &mut m.value },
));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkN4W1Write>(
- "DebugLinkN4W1Write",
+ ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkN1W1Write>(
+ "DebugLinkN1W1Write",
fields,
oneofs,
)
}
}
-impl ::protobuf::Message for DebugLinkN4W1Write {
- const NAME: &'static str = "DebugLinkN4W1Write";
+impl ::protobuf::Message for DebugLinkN1W1Write {
+ const NAME: &'static str = "DebugLinkN1W1Write";
fn is_initialized(&self) -> bool {
true
@@ -5630,8 +5630,8 @@ impl ::protobuf::Message for DebugLinkN4W1Write {
&mut self.special_fields
}
- fn new() -> DebugLinkN4W1Write {
- DebugLinkN4W1Write::new()
+ fn new() -> DebugLinkN1W1Write {
+ DebugLinkN1W1Write::new()
}
fn clear(&mut self) {
@@ -5640,8 +5640,8 @@ impl ::protobuf::Message for DebugLinkN4W1Write {
self.special_fields.clear();
}
- fn default_instance() -> &'static DebugLinkN4W1Write {
- static instance: DebugLinkN4W1Write = DebugLinkN4W1Write {
+ fn default_instance() -> &'static DebugLinkN1W1Write {
+ static instance: DebugLinkN1W1Write = DebugLinkN1W1Write {
key: ::std::option::Option::None,
value: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
@@ -5650,42 +5650,42 @@ impl ::protobuf::Message for DebugLinkN4W1Write {
}
}
-impl ::protobuf::MessageFull for DebugLinkN4W1Write {
+impl ::protobuf::MessageFull for DebugLinkN1W1Write {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkN4W1Write").unwrap()).clone()
+ descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkN1W1Write").unwrap()).clone()
}
}
-impl ::std::fmt::Display for DebugLinkN4W1Write {
+impl ::std::fmt::Display for DebugLinkN1W1Write {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
-impl ::protobuf::reflect::ProtobufValue for DebugLinkN4W1Write {
+impl ::protobuf::reflect::ProtobufValue for DebugLinkN1W1Write {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
-// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkN4W1Read)
+// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkN1W1Read)
#[derive(PartialEq,Clone,Default,Debug)]
-pub struct DebugLinkN4W1Read {
+pub struct DebugLinkN1W1Read {
// message fields
- // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkN4W1Read.key)
+ // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkN1W1Read.key)
pub key: ::std::option::Option<::std::string::String>,
// special fields
- // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkN4W1Read.special_fields)
+ // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkN1W1Read.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
-impl<'a> ::std::default::Default for &'a DebugLinkN4W1Read {
- fn default() -> &'a DebugLinkN4W1Read {
- <DebugLinkN4W1Read as ::protobuf::Message>::default_instance()
+impl<'a> ::std::default::Default for &'a DebugLinkN1W1Read {
+ fn default() -> &'a DebugLinkN1W1Read {
+ <DebugLinkN1W1Read as ::protobuf::Message>::default_instance()
}
}
-impl DebugLinkN4W1Read {
- pub fn new() -> DebugLinkN4W1Read {
+impl DebugLinkN1W1Read {
+ pub fn new() -> DebugLinkN1W1Read {
::std::default::Default::default()
}
@@ -5730,19 +5730,19 @@ impl DebugLinkN4W1Read {
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"key",
- |m: &DebugLinkN4W1Read| { &m.key },
- |m: &mut DebugLinkN4W1Read| { &mut m.key },
+ |m: &DebugLinkN1W1Read| { &m.key },
+ |m: &mut DebugLinkN1W1Read| { &mut m.key },
));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkN4W1Read>(
- "DebugLinkN4W1Read",
+ ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkN1W1Read>(
+ "DebugLinkN1W1Read",
fields,
oneofs,
)
}
}
-impl ::protobuf::Message for DebugLinkN4W1Read {
- const NAME: &'static str = "DebugLinkN4W1Read";
+impl ::protobuf::Message for DebugLinkN1W1Read {
+ const NAME: &'static str = "DebugLinkN1W1Read";
fn is_initialized(&self) -> bool {
true
@@ -5790,60 +5790,60 @@ impl ::protobuf::Message for DebugLinkN4W1Read {
&mut self.special_fields
}
- fn new() -> DebugLinkN4W1Read {
- DebugLinkN4W1Read::new()
+ fn new() -> DebugLinkN1W1Read {
+ DebugLinkN1W1Read::new()
}
fn clear(&mut self) {
self.key = ::std::option::Option::None;
self.special_fields.clear();
}
- fn default_instance() -> &'static DebugLinkN4W1Read {
- static instance: DebugLinkN4W1Read = DebugLinkN4W1Read {
+ fn default_instance() -> &'static DebugLinkN1W1Read {
+ static instance: DebugLinkN1W1Read = DebugLinkN1W1Read {
key: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
-impl ::protobuf::MessageFull for DebugLinkN4W1Read {
+impl ::protobuf::MessageFull for DebugLinkN1W1Read {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkN4W1Read").unwrap()).clone()
+ descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkN1W1Read").unwrap()).clone()
}
}
-impl ::std::fmt::Display for DebugLinkN4W1Read {
+impl ::std::fmt::Display for DebugLinkN1W1Read {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
-impl ::protobuf::reflect::ProtobufValue for DebugLinkN4W1Read {
+impl ::protobuf::reflect::ProtobufValue for DebugLinkN1W1Read {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
-// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkN4W1Response)
+// @@protoc_insertion_point(message:hw.trezor.messages.debug.DebugLinkN1W1Response)
#[derive(PartialEq,Clone,Default,Debug)]
-pub struct DebugLinkN4W1Response {
+pub struct DebugLinkN1W1Response {
// message fields
- // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkN4W1Response.value)
+ // @@protoc_insertion_point(field:hw.trezor.messages.debug.DebugLinkN1W1Response.value)
pub value: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
- // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkN4W1Response.special_fields)
+ // @@protoc_insertion_point(special_field:hw.trezor.messages.debug.DebugLinkN1W1Response.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
-impl<'a> ::std::default::Default for &'a DebugLinkN4W1Response {
- fn default() -> &'a DebugLinkN4W1Response {
- <DebugLinkN4W1Response as ::protobuf::Message>::default_instance()
+impl<'a> ::std::default::Default for &'a DebugLinkN1W1Response {
+ fn default() -> &'a DebugLinkN1W1Response {
+ <DebugLinkN1W1Response as ::protobuf::Message>::default_instance()
}
}
-impl DebugLinkN4W1Response {
- pub fn new() -> DebugLinkN4W1Response {
+impl DebugLinkN1W1Response {
+ pub fn new() -> DebugLinkN1W1Response {
::std::default::Default::default()
}
@@ -5888,19 +5888,19 @@ impl DebugLinkN4W1Response {
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"value",
- |m: &DebugLinkN4W1Response| { &m.value },
- |m: &mut DebugLinkN4W1Response| { &mut m.value },
+ |m: &DebugLinkN1W1Response| { &m.value },
+ |m: &mut DebugLinkN1W1Response| { &mut m.value },
));
- ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkN4W1Response>(
- "DebugLinkN4W1Response",
+ ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DebugLinkN1W1Response>(
+ "DebugLinkN1W1Response",
fields,
oneofs,
)
}
}
-impl ::protobuf::Message for DebugLinkN4W1Response {
- const NAME: &'static str = "DebugLinkN4W1Response";
+impl ::protobuf::Message for DebugLinkN1W1Response {
+ const NAME: &'static str = "DebugLinkN1W1Response";
fn is_initialized(&self) -> bool {
true
@@ -5948,38 +5948,38 @@ impl ::protobuf::Message for DebugLinkN4W1Response {
&mut self.special_fields
}
- fn new() -> DebugLinkN4W1Response {
- DebugLinkN4W1Response::new()
+ fn new() -> DebugLinkN1W1Response {
+ DebugLinkN1W1Response::new()
}
fn clear(&mut self) {
self.value = ::std::option::Option::None;
self.special_fields.clear();
}
- fn default_instance() -> &'static DebugLinkN4W1Response {
- static instance: DebugLinkN4W1Response = DebugLinkN4W1Response {
+ fn default_instance() -> &'static DebugLinkN1W1Response {
+ static instance: DebugLinkN1W1Response = DebugLinkN1W1Response {
value: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
-impl ::protobuf::MessageFull for DebugLinkN4W1Response {
+impl ::protobuf::MessageFull for DebugLinkN1W1Response {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
- descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkN4W1Response").unwrap()).clone()
+ descriptor.get(|| file_descriptor().message_by_package_relative_name("DebugLinkN1W1Response").unwrap()).clone()
}
}
-impl ::std::fmt::Display for DebugLinkN4W1Response {
+impl ::std::fmt::Display for DebugLinkN1W1Response {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
-impl ::protobuf::reflect::ProtobufValue for DebugLinkN4W1Response {
+impl ::protobuf::reflect::ProtobufValue for DebugLinkN1W1Response {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
@@ -6059,10 +6059,10 @@ static file_descriptor_proto_data: &'static [u8] = b"\
inkGcInfo.DebugLinkGcInfoItemR\x05items\x1a?\n\x13DebugLinkGcInfoItem\
\x12\x12\n\x04name\x18\x01\x20\x02(\tR\x04name\x12\x14\n\x05value\x18\
\x02\x20\x02(\x04R\x05value\"/\n\x15DebugLinkSetLogFilter\x12\x16\n\x06f\
- ilter\x18\x01\x20\x01(\tR\x06filter\"\x18\n\x16DebugLinkN4W1Connected\"<\
- \n\x12DebugLinkN4W1Write\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\
- \x14\n\x05value\x18\x02\x20\x01(\x0cR\x05value\"%\n\x11DebugLinkN4W1Read\
- \x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\"-\n\x15DebugLinkN4W1Respon\
+ ilter\x18\x01\x20\x01(\tR\x06filter\"\x18\n\x16DebugLinkN1W1Connected\"<\
+ \n\x12DebugLinkN1W1Write\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\
+ \x14\n\x05value\x18\x02\x20\x01(\x0cR\x05value\"%\n\x11DebugLinkN1W1Read\
+ \x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\"-\n\x15DebugLinkN1W1Respon\
se\x12\x14\n\x05value\x18\x01\x20\x01(\x0cR\x05valueB=\n#com.satoshilabs\
.trezor.lib.protobufB\x12TrezorMessageDebug\x80\xa6\x1d\x01\
";
@@ -6108,10 +6108,10 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
messages.push(DebugLinkGetGcInfo::generated_message_descriptor_data());
messages.push(DebugLinkGcInfo::generated_message_descriptor_data());
messages.push(DebugLinkSetLogFilter::generated_message_descriptor_data());
- messages.push(DebugLinkN4W1Connected::generated_message_descriptor_data());
- messages.push(DebugLinkN4W1Write::generated_message_descriptor_data());
- messages.push(DebugLinkN4W1Read::generated_message_descriptor_data());
- messages.push(DebugLinkN4W1Response::generated_message_descriptor_data());
+ messages.push(DebugLinkN1W1Connected::generated_message_descriptor_data());
+ messages.push(DebugLinkN1W1Write::generated_message_descriptor_data());
+ messages.push(DebugLinkN1W1Read::generated_message_descriptor_data());
+ messages.push(DebugLinkN1W1Response::generated_message_descriptor_data());
messages.push(debug_link_gc_info::DebugLinkGcInfoItem::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(5);
enums.push(debug_link_decision::DebugSwipeDirection::generated_enum_descriptor_data());
### rust/trezor-client/src/protos/generated/messages_management.rs
@@ -3091,8 +3091,8 @@ pub mod features {
Capability_NFC = 23,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.management.Features.Capability.Capability_Tron)
Capability_Tron = 24,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.management.Features.Capability.Capability_N4W1)
- Capability_N4W1 = 25,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.management.Features.Capability.Capability_N1W1)
+ Capability_N1W1 = 25,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.management.Features.Capability.Capability_TouchWakeup)
Capability_TouchWakeup = 26,
}
@@ -3130,7 +3130,7 @@ pub mod features {
22 => ::std::option::Option::Some(Capability::Capability_BLE),
23 => ::std::option::Option::Some(Capability::Capability_NFC),
24 => ::std::option::Option::Some(Capability::Capability_Tron),
- 25 => ::std::option::Option::Some(Capability::Capability_N4W1),
+ 25 => ::std::option::Option::Some(Capability::Capability_N1W1),
26 => ::std::option::Option::Some(Capability::Capability_TouchWakeup),
_ => ::std::option::Option::None
}
@@ -3162,7 +3162,7 @@ pub mod features {
"Capability_BLE" => ::std::option::Option::Some(Capability::Capability_BLE),
"Capability_NFC" => ::std::option::Option::Some(Capability::Capability_NFC),
"Capability_Tron" => ::std::option::Option::Some(Capability::Capability_Tron),
- "Capability_N4W1" => ::std::option::Option::Some(Capability::Capability_N4W1),
+ "Capability_N1W1" => ::std::option::Option::Some(Capability::Capability_N1W1),
"Capability_TouchWakeup" => ::std::option::Option::Some(Capability::Capability_TouchWakeup),
_ => ::std::option::Option::None
}
@@ -3193,7 +3193,7 @@ pub mod features {
Capability::Capability_BLE,
Capability::Capability_NFC,
Capability::Capability_Tron,
- Capability::Capability_N4W1,
+ Capability::Capability_N1W1,
Capability::Capability_TouchWakeup,
];
}
@@ -3230,7 +3230,7 @@ pub mod features {
Capability::Capability_BLE => 21,
Capability::Capability_NFC => 22,
Capability::Capability_Tron => 23,
- Capability::Capability_N4W1 => 24,
+ Capability::Capability_N1W1 => 24,
Capability::Capability_TouchWakeup => 25,
};
Self::enum_descriptor().value_by_index(index)
@@ -13056,8 +13056,8 @@ impl BackupType {
pub enum BackupMethod {
// @@protoc_insertion_point(enum_value:hw.trezor.messages.management.BackupMethod.Display)
Display = 0,
- // @@protoc_insertion_point(enum_value:hw.trezor.messages.management.BackupMethod.N4W1)
- N4W1 = 1,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.management.BackupMethod.N1W1)
+ N1W1 = 1,
}
impl ::protobuf::Enum for BackupMethod {
@@ -13070,22 +13070,22 @@ impl ::protobuf::Enum for BackupMethod {
fn from_i32(value: i32) -> ::std::option::Option<BackupMethod> {
match value {
0 => ::std::option::Option::Some(BackupMethod::Display),
- 1 => ::std::option::Option::Some(BackupMethod::N4W1),
+ 1 => ::std::option::Option::Some(BackupMethod::N1W1),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<BackupMethod> {
match str {
"Display" => ::std::option::Option::Some(BackupMethod::Display),
- "N4W1" => ::std::option::Option::Some(BackupMethod::N4W1),
+ "N1W1" => ::std::option::Option::Some(BackupMethod::N1W1),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [BackupMethod] = &[
BackupMethod::Display,
- BackupMethod::N4W1,
+ BackupMethod::N1W1,
];
}
@@ -13480,7 +13480,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
apability_Haptic\x10\x15\x1a\x04\x80\xa6\x1d\x01\x12\x18\n\x0eCapability\
_BLE\x10\x16\x1a\x04\x80\xa6\x1d\x01\x12\x18\n\x0eCapability_NFC\x10\x17\
\x1a\x04\x80\xa6\x1d\x01\x12\x13\n\x0fCapability_Tron\x10\x18\x12\x19\n\
- \x0fCapability_N4W1\x10\x19\x1a\x04\x80\xa6\x1d\x01\x12\x20\n\x16Capabil\
+ \x0fCapability_N1W1\x10\x19\x1a\x04\x80\xa6\x1d\x01\x12\x20\n\x16Capabil\
ity_TouchWakeup\x10\x1a\x1a\x04\x80\xa6\x1d\x01\x1a\x04\xc8\xf3\x18\x01\
\"\x04\x08\x1b\x10\x1b\"\x0c\n\nLockDevice\"&\n\x07SetBusy\x12\x1b\n\tex\
piry_ms\x18\x01\x20\x01(\rR\x08expiryMs\"\x0c\n\nEndSession\"\xdd\x05\n\
@@ -13607,7 +13607,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\0\x12\x10\n\x0cSlip39_Basic\x10\x01\x12\x13\n\x0fSlip39_Advanced\x10\
\x02\x12\x1c\n\x18Slip39_Single_Extendable\x10\x03\x12\x1b\n\x17Slip39_B\
asic_Extendable\x10\x04\x12\x1e\n\x1aSlip39_Advanced_Extendable\x10\x05*\
- %\n\x0cBackupMethod\x12\x0b\n\x07Display\x10\0\x12\x08\n\x04N4W1\x10\x01\
+ %\n\x0cBackupMethod\x12\x0b\n\x07Display\x10\0\x12\x08\n\x04N1W1\x10\x01\
*G\n\x10SafetyCheckLevel\x12\n\n\x06Strict\x10\0\x12\x10\n\x0cPromptAlwa\
ys\x10\x01\x12\x15\n\x11PromptTemporarily\x10\x02*=\n\x0fDisplayRotation\
\x12\t\n\x05North\x10\0\x12\x08\n\x04East\x10Z\x12\n\n\x05South\x10\xb4\
### tests/conftest.py
@@ -715,7 +715,7 @@ def device_handler(
pytest.param(arg, id=arg.name)
for arg in [
messages.BackupMethod.Display,
- messages.BackupMethod.N4W1,
+ messages.BackupMethod.N1W1,
]
]
@@ -728,7 +728,7 @@ def backup_method(request, _raw_test_ctx: TrezorTestContext) -> messages.BackupM
See https://docs.pytest.org/en/stable/how-to/fixtures.html#parametrizing-fixtures.
"""
REQUIRED_CAPABILITY = {
- messages.BackupMethod.N4W1: messages.Capability.N4W1,
+ messages.BackupMethod.N1W1: messages.Capability.N1W1,
}
method: messages.BackupMethod = request.param
if (capability := REQUIRED_CAPABILITY.get(method)) is not None:
### tests/device_tests/reset_recovery/test_recovery_restart.py
@@ -37,7 +37,7 @@ def flow():
# the device is now in recovery mode
expected_br_names = {
BackupMethod.Display: ("recovery_word_count", "recovery"),
- BackupMethod.N4W1: ("backup_read",),
+ BackupMethod.N1W1: ("backup_read",),
}[backup_method]
assert (yield).name in expected_br_names
# abort current workflow, but remain in recovery
@@ -61,15 +61,15 @@ def flow():
# Interact only via DebugLink
homescreen_content = debug.read_layout().text_content()
- if Capability.N4W1 in session.features.capabilities:
+ if Capability.N1W1 in session.features.capabilities:
# Recovery homescreen = choose backup method:
assert TR.backup__type_have in homescreen_content
- assert TR.backup__type_n4w1 in homescreen_content
+ assert TR.backup__type_n1w1 in homescreen_content
assert TR.backup__type_wordlist in homescreen_content
# Move to the next layout from recovery homescreen
buttons = debug.screen_buttons.word_check_words()
coords = {
- BackupMethod.N4W1: buttons[0],
+ BackupMethod.N1W1: buttons[0],
BackupMethod.Display: buttons[1],
}[backup_method]
debug.click(coords)
### tests/input_flows.py
@@ -41,7 +41,7 @@
EthereumFlow,
PinFlow,
RecoveryFlow,
- n4w1_handle_write,
+ n1w1_handle_write,
)
B = messages.ButtonRequestType
@@ -1828,9 +1828,9 @@ def input_flow_common(self) -> BRGeneratorType:
# 2. Backup warning
yield from click_through(self.debug, screens=2, code=B.ResetDevice)
self.mnemonic = yield from get_mnemonic(self.debug)
- elif self.method is messages.BackupMethod.N4W1:
+ elif self.method is messages.BackupMethod.N1W1:
assert (yield).name == "backup_write"
- self.mnemonic = n4w1_handle_write(self.debug).decode()
+ self.mnemonic = n1w1_handle_write(self.debug).decode()
br = yield
assert br.name == "success_backup"
assert br.code == B.Success
@@ -1895,14 +1895,14 @@ def input_flow_eckhart(self) -> BRGeneratorType:
# mnemonic phrases and rest
self.mnemonic = yield from get_mnemonic(self.debug)
- elif self.method is messages.BackupMethod.N4W1:
+ elif self.method is messages.BackupMethod.N1W1:
# 1. Confirm Reset
# 2. Wallet created
# 3. Backup your seed
yield from click_through(self.debug, screens=3, code=B.ResetDevice)
- # 4. Backup using N4W1
+ # 4. Backup using N1W1
assert (yield).name == "backup_write"
- self.mnemonic = n4w1_handle_write(self.debug).decode()
+ self.mnemonic = n1w1_handle_write(self.debug).decode()
# 5. Success
br = yield
assert br.name == "success_backup"
@@ -2016,9 +2016,9 @@ def load_N_shares(
assert br.name == expected_br_name
debug.press_yes()
- elif method is messages.BackupMethod.N4W1:
+ elif method is messages.BackupMethod.N1W1:
assert (yield).name == "backup_write"
- mnemonics.append(n4w1_handle_write(debug).decode())
+ mnemonics.append(n1w1_handle_write(debug).decode())
else:
raise RuntimeError
@@ -2171,7 +2171,7 @@ def input_flow_delizia(self) -> BRGeneratorType:
def input_flow_eckhart(self) -> BRGeneratorType:
assert self.method in (
messages.BackupMethod.Display,
- messages.BackupMethod.N4W1,
+ messages.BackupMethod.N1W1,
)
if self.repeated:
# intro confirmation screen
@@ -2279,7 +2279,7 @@ def input_flow_delizia(self) -> BRGeneratorType:
def input_flow_eckhart(self) -> BRGeneratorType:
num_screens = {
messages.BackupMethod.Display: 10,
- messages.BackupMethod.N4W1: 8,
+ messages.BackupMethod.N1W1: 8,
}[self.method]
# 1. Confirm Reset
# 2. Wallet Created
@@ -2383,7 +2383,7 @@ def input_flow_eckhart(self) -> BRGeneratorType:
yield # Confirm show seeds
self.debug.press_yes()
- elif self.backup_method is messages.BackupMethod.N4W1:
+ elif self.backup_method is messages.BackupMethod.N1W1:
if self.share_count > 1:
assert (yield).name == "warning_shamir_backup"
self.debug.press_yes()
@@ -2449,9 +2449,9 @@ def load_5_groups_5_shares(
# Phrase screen
mnemonic = yield from read_and_confirm_mnemonic(debug)
assert mnemonic is not None
- elif backup_method is messages.BackupMethod.N4W1:
+ elif backup_method is messages.BackupMethod.N1W1:
assert (yield).name == "backup_write"
- mnemonic = n4w1_handle_write(debug).decode()
+ mnemonic = n1w1_handle_write(debug).decode()
else:
raise RuntimeError
mnemonics.append(mnemonic)
@@ -2741,7 +2741,7 @@ def input_flow_eckhart(self) -> BRGeneratorType:
# 20. Confirm show seeds (only for BackupMethod.Display)
screens = {
messages.BackupMethod.Display: 20,
- messages.BackupMethod.N4W1: 18,
+ messages.BackupMethod.N1W1: 18,
}[self.method]
yield from click_through(self.debug, screens=screens, code=B.ResetDevice)
### tests/input_flows_helpers.py
@@ -361,10 +361,10 @@ def input_mnemonic(
assert "MnemonicKeyboard" in self.debug.read_layout().all_components()
for _, word in enumerate(mnemonic):
self.debug.input(word)
- elif method is messages.BackupMethod.N4W1:
+ elif method is messages.BackupMethod.N1W1:
assert br.code == B.Other
assert br.name == "backup_read"
- n4w1_handle_read(self.debug, " ".join(mnemonic).encode())
+ n1w1_handle_read(self.debug, " ".join(mnemonic).encode())
else:
raise RuntimeError
@@ -740,20 +740,20 @@ def check_address():
raise ValueError("Unknown model!")
-def n4w1_handle_write(debug: DebugLink) -> bytes:
- assert debug._call(messages.DebugLinkN4W1Connected()) == messages.DebugLinkN4W1Read(
+def n1w1_handle_write(debug: DebugLink) -> bytes:
+ assert debug._call(messages.DebugLinkN1W1Connected()) == messages.DebugLinkN1W1Read(
key="mnemonic"
)
write = debug._call(
- messages.DebugLinkN4W1Response(), expect=messages.DebugLinkN4W1Write
+ messages.DebugLinkN1W1Response(), expect=messages.DebugLinkN1W1Write
)
assert write.key == "mnemonic" and write.value is not None
- assert debug._call(messages.DebugLinkN4W1Response(), expect=messages.Success)
+ assert debug._call(messages.DebugLinkN1W1Response(), expect=messages.Success)
return write.value
-def n4w1_handle_read(debug: DebugLink, value: bytes | None) -> None:
- assert debug._call(messages.DebugLinkN4W1Connected()) == messages.DebugLinkN4W1Read(
+def n1w1_handle_read(debug: DebugLink, value: bytes | None) -> None:
+ assert debug._call(messages.DebugLinkN1W1Connected()) == messages.DebugLinkN1W1Read(
key="mnemonic"
)
- debug._call(messages.DebugLinkN4W1Response(value=value), expect=messages.Success)
+ debug._call(messages.DebugLinkN1W1Response(value=value), expect=messages.Success)Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.