1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00
Commit Graph

867 Commits

Author SHA1 Message Date
kandycoder
34a563018d
docs(python): fix bip32 path (#3129) 2023-07-06 00:38:21 +02:00
tychovrahe
32a2b371bd feat(core): allow different screen sizes for TT UI
[no changelog]
2023-06-15 17:08:14 +02:00
tychovrahe
d3284baf21 feat(core): support STM32F429 discovery board 2023-06-15 17:08:14 +02:00
tychovrahe
8d812ca36e feat(core): support device variants
[no changelog]
2023-06-07 19:48:53 +02:00
tychovrahe
cd722f5126 fix(python): fix T2B1 keys in trezorlib
[no changelog]
2023-06-06 22:12:53 +02:00
tychovrahe
a2f8cb9d1c feat(core): add internal model field to features
[no changelog]
2023-06-06 09:39:45 +02:00
Martin Milata
46f9e898ca fix(core/ui): padding when backing up mnemonic words
[no changelog]
2023-06-02 18:47:09 +02:00
matejcik
703a38517a chore(python): bump version after release 2023-06-02 14:49:48 +02:00
matejcik
f588046ded docs(python): regenerate changelog 2023-06-02 14:49:48 +02:00
matejcik
c3eb1664ef chore(python): add T2B1 keys to trezorlib 2023-06-02 14:48:59 +02:00
matejcik
b6c2f2e5ba feat(core): add hw_model field to vendor headers 2023-06-02 14:43:19 +02:00
grdddj
da14c22712 feat(all): add UI for Model R 2023-05-31 10:14:54 +02:00
grdddj
590315bdc1 feat(all): change debugging messages in protobuf 2023-05-11 21:02:21 +02:00
grdddj
bd6783b1a3 feat(all): increase stability of debug-decision events + parsing JSON from Rust 2023-05-11 21:02:21 +02:00
matejcik
00a4fe44e8 chore(python): bump version after release 2023-04-27 13:38:21 +02:00
matejcik
fc5bffb890 docs(python): changelog for 0.13.6 2023-04-27 13:37:16 +02:00
matejcik
f6534d4220 feat(python/trezorctl): better conversion to Trezor homescreen format (fixes #2880) 2023-04-27 13:37:16 +02:00
matejcik
67748f3c94 docs(python): correctly mark original issue for wiping bootloader 2023-04-27 13:37:16 +02:00
matejcik
1141ccdf79 fix(python/trezorctl): limit memory for one field (fixes #2439) 2023-04-27 13:37:16 +02:00
matejcik
09de7ce4f2 feat(python/trezorctl): support prompt configuration for encrypt/decrypt keyvalue
fixes #2608
2023-04-27 13:37:16 +02:00
matejcik
cc2314d89d fix(python/trezorctl): do not prompt twice when enabling force-on-device
fixes #2833
2023-04-27 13:37:16 +02:00
grdddj
abeb34454c feat(python): use DebugLinkRecordScreen.refresh_index when restarting emulator
During each restart, Emulator will transfer the original screen-recording directory
to the new emulator/client and will change the refresh_index so that older screenshots
are not being overwritten by new ones.

[no changelog]
2023-04-11 15:15:44 +02:00
grdddj
9804926682 feat(common/protob): add optional uint32 refresh_index into DebugLinkRecordScreen message
Allows for screenshots from multiple emulator restarts being recorded in the same
directory without being overwritten by each other.
(As core/embed/unix/display-unix.c::display_save() starts with zero index after each restart.)

[no changelog]
2023-04-11 15:15:44 +02:00
tychovrahe
923b1c42b0 fix(cli): don't try to initialize device after wipe in bootloader 2023-04-11 13:57:12 +02:00
matejcik
606518d80e tests: test behavior of USB-ignoring autolock
[no changelog]
2023-04-07 19:44:32 +02:00
matejcik
799c420dda fix(python): support all image types in firmware-fingerprint.py
[no changelog]
2023-04-05 16:36:29 +02:00
matejcik
7638694484 chore: make fields on FirmwareRequest required (fixes #1941)
[no changelog]
2023-04-03 22:01:26 +02:00
matejcik
6e85d61688 feat(core): QA build for testing bootloaders / upgrades
[no changelog]
2023-04-03 22:01:26 +02:00
matejcik
fa7c818cfc fix(python/trezorctl): re-enable trezorctl -p udp
[no changelog]
2023-04-03 22:01:26 +02:00
Martin Milata
c100358ce2 fix(core/ui): don't send ButtonRequest when displaying GetAddress QR code
[no changelog]
2023-04-03 17:57:18 +02:00
matejcik
92c037d89e fix(python/trezorctl): fix colliding option shortcut in ethereum sign-tx
fixes #2535
2023-03-24 13:24:46 +01:00
Martin Novák
e6a7b9ccaa feat(python): support external Ethereum definitions 2023-03-24 13:24:46 +01:00
matejcik
80af1c552e feat(tests): seemingly stable workaround for the wait_layout instability
[no changelog]
2023-03-21 12:47:28 +01:00
Andrew Kozlik
9e23ba8864 feat(trezorctl): Support SLIP-25 in get-descriptor 2023-03-20 17:55:49 +01:00
Martin Milata
483c7a6342 chore(python): debuglink: wait for swipe
[no changelog]
2023-03-09 23:36:36 +01:00
Martin Milata
4af5939a0b feat(core/ui): redesigned receive flow
[no changelog]
2023-03-09 23:36:36 +01:00
David Misiak
79632d32c7 chore(cardano): update ui tests, add changelog 2023-03-06 11:27:13 +01:00
David Misiak
826ade2a8d chore(cardano): rename voting public key to vote public key 2023-03-06 11:27:13 +01:00
David Misiak
0754a008e9 chore(cardano): rename cvote reward_address to payment_address 2023-03-06 11:27:13 +01:00
David Misiak
2011ffe9c9 chore(cardano): replace governance by cvote 2023-03-06 11:27:13 +01:00
David Misiak
a94cfa1a13 feat(cardano): allow external reward addresses in governance registrations 2023-03-06 11:27:13 +01:00
matejcik
966e5d8286 fix(python): allow unsigned legacy firmware (fixes #2801) 2023-02-20 14:59:02 +01:00
matejcik
c4bf4fa884 fix(python): improve type checking 2023-02-20 14:59:02 +01:00
matejcik
00304471ca feat(python): add pybridge tool
[no changelog]
2023-02-20 14:59:02 +01:00
grdddj
07e51279e2 feat(python): ability to not show passphrase coming from host
[no changelog]
2023-02-17 12:55:11 +01:00
grdddj
491a8523bc feat(tests): allow for saving text layout of all screens during UI tests
[no changelog]
2023-02-03 16:51:14 +01:00
matejcik
0846f3a9e3 fix(python/transport): fix UDP prefix search if correct full path is given 2023-02-03 13:01:47 +01:00
matejcik
87710bab92 chore(python): uncompress hex keys for T1 dev
because production keys are also uncompressed
2023-02-03 13:01:47 +01:00
matejcik
248eafc4ca fix(python): better type hints for firmware fields 2023-02-03 13:01:47 +01:00
matejcik
508b6a87e6 fix(tests): ensure the client is open when stopping screen recording
[no changelog]
2023-02-02 12:40:39 +01:00
tychovrahe
d00e87ea80 feat(core/rust): homescreen background image
[no changelog]
2023-01-19 14:11:42 +01:00
grdddj
72ef41664f feat(python): show fingerprint before signatures in trezorctl firmware verify 2023-01-13 16:39:25 +01:00
matejcik
e6feef5388 chore(python): bump version after release 2022-12-28 16:27:09 +01:00
matejcik
e545f8c451 docs(python): changelog for 0.13.5 release 2022-12-28 16:21:23 +01:00
matejcik
305d9091bd refactor(python/firmware): improve headertool, recognize legacy v3 signatures 2022-12-28 14:10:14 +01:00
matejcik
ef10457332 refactor(python/firmware): introduce legacy v3 signing detection
related, change verify() method to accept dev_keys bool and select
the appropriate keys, as opposed to caller needing to figure out the keys
2022-12-28 14:10:14 +01:00
matejcik
61a7e09bae feat(python/firmware): introduce fw model field 2022-12-27 15:24:10 +01:00
matejcik
cd20ff242f feat(python/firmware): introduce a cleaner database of signing keys 2022-12-27 15:23:57 +01:00
matejcik
5a237d6a94 feat(core/headertool): detect devel signatures for more objects (fixes #2616)
[no changelog]
2022-12-16 13:24:18 +01:00
grdddj
dc22f98aed chore(python): better static typing for debuglink and emulator
[no changelog]
2022-11-21 14:08:47 +01:00
grdddj
e9a1bcc951 feat(python): add debuglink helpers to get layout information 2022-11-21 14:08:47 +01:00
matejcik
cc71f4f159 chore(python): bump version after release 2022-11-04 10:12:32 +01:00
matejcik
fef998bc1f build(python): exclude downloaded firmwares from sdist 2022-11-04 10:12:32 +01:00
matejcik
d4af49c585 docs(python): generate changelogs for 0.13.4 2022-11-04 10:12:32 +01:00
matejcik
1cbe96c6e5 fix(python/internal): fix key index handling in firmware_headers.py
[no changelog]
2022-11-04 09:51:53 +01:00
Andrew Kozlik
3d645d609a chore(common): Rename "unstable" protobuf tag to "experimental_message".
[no changelog]
2022-11-02 14:58:01 +01:00
matejcik
e49066c73f tools(python): update relicensing script 2022-11-01 14:56:00 +01:00
matejcik
cda35e0e87 docs(python): add or update license headers 2022-11-01 14:56:00 +01:00
matejcik
ce307c9484 feat(common): mark CoSi fields as required
[no changelog]
2022-11-01 14:56:00 +01:00
matejcik
1afc78e368 feat(python): add warning for insecure CoSi firmware 2022-11-01 14:56:00 +01:00
matejcik
a7482f4c6a refactor(python): convert firmware parsing to classes 2022-11-01 14:56:00 +01:00
matejcik
1b8204109e refactor(python): move firmware functionality to a submodule 2022-11-01 14:56:00 +01:00
matejcik
a7d6e194a1 refactor(python): move out TOIF related structs to trezorlib.toif 2022-11-01 14:56:00 +01:00
grdddj
47a749d683 chore(proto): remove default value from NEM payload
[no changelog]
2022-11-01 10:57:27 +01:00
grdddj
fd1fbc9372 fix(python): add default value to protobuf.Field
[no changelog]
2022-11-01 10:57:27 +01:00
David Misiak
51a8e18c8d feat(cardano): add preprod and preview testnets 2022-10-31 16:08:39 +01:00
David Misiak
ec83d0187f chore(cardano): update ui tests, add changelog 2022-10-31 16:08:39 +01:00
David Misiak
c36870defa chore(cardano): rename Catalyst to governance 2022-10-31 16:08:39 +01:00
David Misiak
ab02f7a400 feat(cardano): add support for CIP36 Catalyst registration format 2022-10-31 16:08:39 +01:00
Andrew Kozlik
afd900f9b1 feat(common): Add CoinJoin request message.
[no changelog]
2022-10-27 17:37:48 +02:00
Simon Males
393bbb2bf1 chore(docs): Clean up dead links [no changelog] 2022-10-25 15:27:32 +02:00
Andrew Kozlik
5b453c88ed feat(core): Add serialize option to SignTx. 2022-10-17 15:20:46 +02:00
grdddj
e0693d3a55 feat(python): add trezorctl possibility to record screen changes 2022-10-12 13:44:53 +02:00
Juliya Smith
cc49e2922d
fix(python): publish package types (#2543)
* fix: publish types to consumers

* chore: add changelog
2022-10-06 16:12:05 +02:00
Andrew Kozlik
448f97b736 feat(trezorctl): Support SLIP-25 accounts in get-public-node and get-address. 2022-10-04 20:17:56 +02:00
Andrew Kozlik
a047795d19 fix(trezorlib): Don't support preauthorized operations for get_public_node() and get_address().
[no changelog]
2022-10-04 20:17:56 +02:00
tychovrahe
f7b9bb4ef8 feat(core/rust): use dma2d to improve rendering performance, implement text over image and icon over icon functions 2022-09-29 21:50:10 +02:00
tychovrahe
661ae37506 feat(tools): add toif conversion from greyscale with transparency (alpha channel)
[no changelog]
2022-09-09 22:58:10 +02:00
Andrew Kozlik
a394ac5bb4 feat(python): Support UnlockPath in trezorlib. 2022-08-30 15:53:44 +02:00
Andrew Kozlik
9d89c3cb1b feat(common): Add UnlockPath message.
[no changelog]
2022-08-30 15:53:44 +02:00
grdddj
d5b0650cc2 feat(tests): add possibility to run device/UI tests in parallel 2022-08-29 15:47:36 +02:00
Andrew Kozlik
a3ac5d752e feat(trezorctl): Add device set-busy command. 2022-08-22 18:15:29 +02:00
Andrew Kozlik
792dadfc4d feat(common): Add SetBusy message.
[no changelog]
2022-08-22 18:15:29 +02:00
Andrew Kozlik
ad5a572b75 chore(common): Deprecate data field in CosiCommit message. 2022-08-02 20:38:04 +02:00
matejcik
a6410693b3 Revert "feat(core): implement firmware dumping"
This reverts commit 37c61c1381.
2022-08-02 17:12:07 +02:00
matejcik
4c347b7acc Revert "feat(python): implement firmware dumping"
This reverts commit ee694f36cf.
2022-08-02 17:12:07 +02:00
matejcik
b01778c9ce chore(python): bump version after release 2022-07-13 15:16:15 +02:00
matejcik
f607cb2501 docs(python): regenerate changelog 2022-07-13 15:15:26 +02:00
matejcik
ff85e0f92d fix(python): fix result_callback correctly this time 2022-07-13 15:14:33 +02:00
matejcik
9f69057b9b fix(python): fix Click 7.x by passing explicit version to version_option 2022-07-13 15:12:12 +02:00
matejcik
bd9bfc6996 build(python): widen tox test matrix to include multiple Click versions 2022-07-13 14:36:28 +02:00
gabrielkerekes
11f8e81083 chore(cardano): update changelog 2022-07-04 15:58:27 +02:00
David Misiak
ba7fb2cb54 feat(cardano): allow required signers in more signing modes 2022-07-04 15:58:27 +02:00
David Misiak
4017434cc1 feat(cardano): add support for babbage features 2022-07-04 15:58:27 +02:00
David Misiak
99a7c48e64 feat(cardano): add babbage data types 2022-07-04 15:58:27 +02:00
matejcik
f3bfdd41fe chore(python): bump version after release 2022-06-30 20:18:25 +02:00
matejcik
741b7305b5 docs(python): regenerate changelog 2022-06-30 15:56:12 +02:00
matejcik
63ab0711e2 fix(python): fix crashing trezorctl --version
fixes #1702
2022-06-30 15:56:06 +02:00
matejcik
3141f808dd fix(python/trezorctl): do not implicitly import rlp on Python 3.6 2022-06-30 15:35:07 +02:00
matejcik
5977cca202 test(python): better dependency checking in tox 2022-06-30 14:57:25 +02:00
matejcik
455884932e fix(python): do not implicitly import PIL by trezorctl 2022-06-30 14:57:25 +02:00
matejcik
7d40f98153 chore(python): bump version after release 2022-06-30 13:13:43 +02:00
matejcik
1eeecbe27f docs(python): freshen up READMEs, generate changelog 2022-06-29 14:35:16 +02:00
matejcik
8049282bdb feat(python): detect busy device as a separate condition
fixes #1026
2022-06-29 14:35:16 +02:00
matejcik
aaa224a4f7 feat(python/trezorctl): detect script type from path (fixes #2159) 2022-06-29 14:35:16 +02:00
matejcik
60648c903f fix(changelog): explicitly include title in rendered template 2022-06-29 14:35:16 +02:00
matejcik
c12e4edd70 fix(python/trezorctl): improve docs and behavior around unexpected messages
closes #2254
2022-06-29 14:35:16 +02:00
matejcik
8c3d3c6548 chore: bump black to 22.3
changes:
* exponent operator ** now allows no spaces around itself: https://github.com/psf/black/issues/538
* optional unicode marker u"" is no longer allowed

[no changelog]
2022-06-29 14:35:16 +02:00
matejcik
01257abacd build(python): bump click to 8.1 2022-06-29 14:35:16 +02:00
matejcik
5173cd3b82 fix(python): click 8.1 compatibility
fixes #2199
2022-06-29 14:35:16 +02:00
matejcik
2fb4e5de5c build(python): load requirements from requirements.txt 2022-06-29 14:35:16 +02:00
Ondrej Mikle
c563c987e1 feat(core): jump back and stay in bootloader for TT via reverse SVC call trampoline 2022-06-01 14:50:59 +02:00
David Misiak
a1eaa465aa chore(cardano): remove legacy types 2022-05-23 11:08:52 +02:00
grdddj
6dc4426151 feat(ui): setup homescreen and label for model R
[no changelog]
2022-05-19 14:09:16 +02:00
Martin Milata
c5f1bec474 Merge branch 'release/22.05' 2022-05-18 12:43:53 +02:00
Pavol Rusnak
38ad9ab9e5 fix(python): only even-width grayscale icons are supported
[no changelog]
2022-05-16 15:01:37 +02:00
Dusan Klinec
5e6582a3fe feat(xmr): add support for HF15, BP+ 2022-05-16 12:37:24 +02:00
matejcik
6feada2eed style(python/monero): improve type signature on Monero functions 2022-05-16 12:37:24 +02:00
Dusan Klinec
33c174491f refactor(core/monero): Monero code cleanup
* remove support for HF12 and below
* remove MLSAG support
* clean up monero cryptography naming
* get rid of "optional first argument" pattern, in favor of mandatory argument that is allowed to be None
  (and fix several bugs related to this feature)

Co-authored-by: grdddj <jiri.musil06@seznam.cz>
Co-authored-by: Martin Milata <martin@martinmilata.cz>
Co-authored-by: matejcik <ja@matejcik.cz>
2022-05-16 12:37:24 +02:00
grdddj
8e1b5a969c feat(python): support model R in trezorlib 2022-05-06 11:44:52 +02:00
Andrew Kozlik
458d6e1b4b fix(trezorctl): Fix BIP-32 path in CoSi help.
[no changelog]
2022-05-03 21:50:50 +02:00
matejcik
ee694f36cf feat(python): implement firmware dumping 2022-05-03 19:00:04 +02:00
matejcik
37c61c1381 feat(core): implement firmware dumping 2022-05-03 19:00:04 +02:00
Andrew Kozlik
e43c14f448 feat(trezorctl): Add firmware get-hash command. 2022-05-03 19:00:04 +02:00
Andrew Kozlik
6fe2d76dc1 feat(common): Add GetFirmwareHash message. 2022-05-03 19:00:04 +02:00
grdddj
068e97c258 feat(python): unify option arguments in trezorctl 2022-03-24 14:30:20 +01:00
grdddj
d7d228e716 chore(python): limit click version to be below 8.1 2022-03-24 14:30:20 +01:00
matejcik
61718aff49 feat(tools): make pyright_tool more user-friendly
[no changelog]

* passed in directory respects absolute and relative paths instead of
  working "from repository root"
* we don't require the enableTypeIgnoreComments to be set so both
  `pyright` and `pyright_tool` can work with the same config at the same
  time
* use click's magic functionality to deal with missing / unreadable /
  unwriteable files
* read the error results via a pipe, do not write to filesystem unless
  requested
* simplified logic regarding "test mode"/"dev mode"
* renamed `--log` to more typical `--verbose`
* use pathlib more extensively
2022-03-23 14:55:05 +01:00
David Misiak
915781bfb1 chore(cardano): update changelog and ui tests 2022-03-18 14:32:54 +01:00
David Misiak
117c3c932f fix(cardano): update testnet protocol magic 2022-03-18 14:32:54 +01:00
David Misiak
9f9535abb3 feat(cardano): add key hash stake credentials 2022-03-18 14:32:54 +01:00
David Misiak
2262602967 feat(cardano): add support for plutus transactions 2022-03-18 14:32:54 +01:00
David Misiak
48587d83fe feat(cardano): add support for output datum hash and script data hash 2022-03-18 14:32:54 +01:00
David Misiak
2b3a53a6ae feat(cardano): add support for network id in tx body 2022-03-18 14:32:54 +01:00
Pavol Rusnak
edb87359eb feat(core): headless emulator implies disabled animations
[no changelog]
2022-03-18 11:58:04 +01:00
Andrew Kozlik
8be6689150 chore(common): Rework AuthorizeCoinJoin message parameters.
[no changelog]
2022-03-17 15:46:01 +01:00
grdddj
a38a0b6295 fix(python): fix eth.sign-tx - correct input into rlp.encode()
[no changelog]
2022-03-16 16:09:07 +01:00
grdddj
3d505874aa feat(ci): create pyright tool and include it in CI
[no changelog]
2022-03-02 15:43:50 +01:00
matejcik
e0754d1609 fix(python/protobuf): correctly dump messages with missing required fields 2022-02-21 14:37:25 +01:00
grdddj
319d0f16e3 chore(python): loosen ethereum dependencies
[no changelog]
2022-02-18 18:40:47 +01:00
grdddj
58fb6c77a7 feat(python): add screenshotting capability for T1 in Debuglink 2022-02-17 11:05:55 +01:00
grdddj
0e27423cff feat(ci): add quick style checks suitable for git hooks
[no changelog]
2022-02-16 10:36:47 +01:00
Ferdinando Ametrano
3c0cb4d763 feat(python): extend sign_message to also sign bytes, not only string 2022-02-15 14:27:59 +01:00
Pavol Rusnak
b9bbd5fcd7 chore: update dependencies
[no changelog]

Co-Authored-By: Martin Milata <martin@martinmilata.cz>
2022-02-15 13:28:03 +01:00
Andrew Kozlik
bf2baf798f feat(trezorctl): Support generating Electrum-compatible message signatures. 2022-02-11 15:36:00 +01:00
Andrew Kozlik
f6154b311e chore(trezorlib): Support payment requests and GetNonce command. 2022-01-31 18:00:22 +01:00
Andrew Kozlik
d0c3a6a2fa chore(core): Add mac field to Address message.
[no changelog]
2022-01-31 18:00:22 +01:00
Andrew Kozlik
0959947a88 chore(common): Add GetNonce, Nonce and TxAckPaymentRequest message.
[no changelog]
2022-01-31 18:00:22 +01:00
Andrew Kozlik
ba4f046d6f feat(common): Add INFO button to DebugLinkDecision.
[no changelog]
2022-01-27 13:15:04 +01:00
Alois Klink
5c4703c9bb fix(core,legacy): Fix domain-only ethTypedData
When doing Ethereum signTypedData, and the primaryType="EIP712Domain",
we completely ignore the "message" part and only sign the domain.

According to the community, this is technically allowed by the spec,
and may be used by ETH smart contracts to save on gas.

Test case generated by @MetaMask/eth-sig-util's library.

See: https://ethereum-magicians.org/t/eip-712-standards-clarification-primarytype-as-domaintype/3286
2022-01-14 14:22:46 +01:00
matejcik
8b2e2112bc style(python/btc): better specification of type of prev_txes
[no changelog]
2022-01-13 13:01:17 +01:00
grdddj
e3d366e65b feat(python): ScriptUI for trezorctl, reference client implementation 2022-01-12 14:52:01 +01:00
matejcik
dfab3efb86 style(python): fix typecheck issues
[no changelog]
2022-01-07 21:41:17 +01:00
matejcik
8d8cfd6692 build: fully replace mypy with pyright
[no changelog]
2022-01-07 21:41:17 +01:00
Pavol Rusnak
b0e0280465 chore: drop obsolete fw_vendor_keys field from Features
[no changelog]
2022-01-03 14:23:58 +01:00
Alisina Bahadori
77ab865386 feat(legacy): Implement EIP-712 signing 2021-12-19 20:36:30 +01:00
Carlosbogo
dd1240ef53
docs: update links in changelogs (#2013)
fixes #2011
2021-12-17 14:53:21 +01:00
matejcik
38d44e6803 chore(python): bump trezorlib version in repo 2021-12-10 10:54:04 +01:00
matejcik
911dbf0522 chore(python): regenerate OPTIONS readme 2021-12-09 14:32:43 +01:00
matejcik
48523d3d5b chore(python): exclude mako template from distributed packages 2021-12-09 14:32:43 +01:00
matejcik
05535173ac docs(python): add changelog for 0.13.0 2021-12-09 14:32:43 +01:00
matejcik
a1161384b0 chore(python): bump typing_extensions requirement 2021-12-09 14:32:43 +01:00
matejcik
b343ad3931 style(python): mark Reader/Writer protocol arguments as position-only
Using `__`-prefixed names seems to be a convention for specifying
position-only arguments before Python 3.8. Pyright respects this
convention and in fact requires it since version 1.1.192.
2021-12-08 10:00:48 +01:00
matejcik
3441d2eb19 chore(python): add Click typing info to requirements 2021-12-07 16:55:58 +01:00
matejcik
85d707615f chore(python): specify Python version for type checking 2021-12-07 16:55:58 +01:00
matejcik
a4bcc95deb feat(python): introduce Trezor models
This keeps information about vendors and USB IDs in one place, and
allows us to extend with model-specific information later.

By default, this should be backwards-compatible -- TrezorClient can
optionally accept model information, and if not, it will try to guess
based on Features.

It is possible to specify which models to look for in transport
enumeration. Bridge and UDP transports ignore the parameter, because
they can't know what model is on the other side.

supersedes #1448 and #1449
2021-12-07 16:55:58 +01:00
matejcik
38fca4a83d chore(python): regenerate GNU copyright headers 2021-12-07 16:55:58 +01:00
matejcik
8f32e0ba05 chore(python/changelog): unify changelog entries 2021-12-07 16:55:58 +01:00
matejcik
83bb3a0932 feat(python): show progress bar for firmware upload 2021-12-07 16:55:58 +01:00
matejcik
a2a8cc88d9 feat(python): make the protobuf mappings overridable 2021-12-07 16:55:58 +01:00
Andrew Chow
dbf57d745a feat(python): Optionally init_device in TrezorClient 2021-12-07 16:55:58 +01:00
Andrew Chow
23a09fc047 feat(python): Raise ValueError for non-existant tx hashes
If the device asks for a tx_hash which is not present in prev_txes,
raise a ValueError with some more detailed messaging about the missing
hash rather than the default dictionary lookup failure of KeyError.
2021-12-07 16:55:58 +01:00
grdddj
d6b99ba3eb fix(python): allowing PIN/passphrase input for Git Bash 2021-12-01 13:06:41 +01:00
matejcik
6d3b49934a chore(python/tools): bump version in encfs_aes_getpass 2021-11-26 16:28:49 +01:00
matejcik
c2bad83296 refactor(python): improve handling of data for trezorlib.ethereum.sign_tx() 2021-11-26 16:28:49 +01:00
grdddj
26173c243a feat(python): enable pyright-based type checking 2021-11-26 16:28:49 +01:00
grdddj
1a0b590914 feat(python): add full type information
WIP - typing the trezorctl apps

typing functions trezorlib/cli

addressing most of mypy issue for trezorlib apps and _internal folder

fixing broken device tests by changing asserts in debuglink.py

addressing most of mypy issues in trezorlib/cli folder

adding types to some untyped functions, mypy section in setup.cfg

typing what can be typed, some mypy fixes, resolving circular import issues

importing type objects in "if TYPE_CHECKING:" branch

fixing CI by removing assert in emulator, better ignore comments

CI assert fix, style fixes, new config options

fixup! CI assert fix, style fixes, new config options

type fixes after rebasing on master

fixing python3.6 and 3.7 unittests by importing Literal from typing_extensions

couple mypy and style fixes

fixes and improvements from code review

silencing all but one mypy issues

trial of typing the tools.expect function

fixup! trial of typing the tools.expect function

@expect and @session decorators correctly type-checked

Optional args in CLI where relevant, not using general list/tuple/dict where possible

python/Makefile commands, adding them into CI, ignoring last mypy issue

documenting overload for expect decorator, two mypy fixes coming from that

black style fix

improved typing of decorators, pyright config file

addressing or ignoring pyright errors, replacing mypy in CI by pyright

fixing incomplete assert causing device tests to fail

pyright issue that showed in CI but not locally, printing pyright version in CI

fixup! pyright issue that showed in CI but not locally, printing pyright version in CI

unifying type:ignore statements for pyright usage

resolving PIL.Image issues, pyrightconfig not excluding anything

replacing couple asserts with TypeGuard on safe_issubclass

better error handling of usb1 import for webusb

better error handling of hid import

small typing details found out by strict pyright mode

improvements from code review

chore(python): changing List to Sequence for protobuf messages

small code changes to reflect the protobuf change to Sequence

importing TypedDict from typing_extensions to support 3.6 and 3.7

simplify _format_access_list function

fixup! simplify _format_access_list function

typing tools folder

typing helper-scripts folder

some click typing

enforcing all functions to have typed arguments

reverting the changed argument name in tools

replacing TransportType with Transport

making PinMatrixRequest.type protobuf attribute required

reverting the protobuf change, making argument into get_pin Optional

small fixes in asserts

solving the session decorator type issues

fixup! solving the session decorator type issues

improvements from code review

fixing new pyright errors introduced after version increase

changing -> Iterable to -> Sequence in enumerate_devices, change in wait_for_devices

style change in debuglink.py

chore(python): adding type annotation to Sequences in messages.py

better "self and cls" types on Transport

fixup! better "self and cls" types on Transport

fixing some easy things from strict pyright run
2021-11-26 16:28:49 +01:00
grdddj
2487c89527 chore(python): increasing mnemonic version to 0.20 2021-11-26 16:28:49 +01:00
grdddj
77afcb335b chore(python): replacing attrs with dataclasses 2021-11-26 16:28:49 +01:00
grdddj
57579c5a80 chore(python): removing pyblake2 as a required library 2021-11-26 16:28:49 +01:00
Pavol Rusnak
0fc3b32b7e fix(python): accept also "taproot" for taproot scripts in cli
[no changelog]
2021-11-22 11:25:19 +01:00
matejcik
a1a1a7a36c fix(proto): fix typo in previous commit 2021-11-19 15:03:33 +01:00
Andrew Kozlik
9a7990d087 feat(tests): Add no_script_type device tests for SignMessage. 2021-11-10 17:35:57 +01:00
Andrew Kozlik
c2f1850abb feat(common): Add no_script_type option to SignMessage. 2021-11-10 17:35:57 +01:00
matejcik
0870befe58 docs: add changelogs 2021-11-10 13:57:57 +01:00
matejcik
2a2da21879 fix(python/debuglink): fix formatting for expected messages
This was broken by the previous commit removing f-strings. For this
reason, `format()` was renamed to `to_string` to make it clearer that
it's not the `str.format` method.
2021-11-10 13:57:57 +01:00
matejcik
f8b9cda05d feat(python): support Cardano derivation type arguments 2021-11-10 13:57:57 +01:00
matejcik
10e338e005 feat(core/cardano): allow derivation type selection 2021-11-10 13:57:57 +01:00
matejcik
9922e7ba48 feat(python): support derive_cardano setting 2021-11-10 13:57:57 +01:00
matejcik
846eca36ca feat(python): add type information to the UI object 2021-11-10 13:57:57 +01:00