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

38 Commits

Author SHA1 Message Date
tychovrahe
7c94080227 refactor(core): move vendor headers to model specific directories
[no changelog]
2024-07-16 15:56:28 +02:00
matejcik
cd55d32407 refactor(python/protobuf): allow field types imported in the same module 2024-06-25 13:43:13 +02:00
matejcik
5f016a896a chore: upgrade style checkers
black 24.2.0
flake8 7.0.0

some neat improvements for if-else statements there
2024-02-29 13:08:18 +01:00
overcat
579cc0d882 feat(common & core & legacy & python/stellar): add support for ClaimClaimableBalanceOp. 2023-12-11 11:14:33 +01:00
gabrielkerekes
0dff9390db fix(python): replace base58 implementation with a more correct one
based on https://github.com/keis/base58/blob/master/base58/__init__.py
2023-12-05 22:11:41 +01:00
matejcik
b68412e89b style(python): use 'h' for hardening in descriptors too 2023-10-20 15:45:32 +02:00
matejcik
f7aec0aeb1 tests(python): bump Stellar SDK version
fixes a problem with outdated python 3.11 dependencies
2023-10-16 13:51:36 +02:00
Pavol Rusnak
9b78dd107b fix(python): drop simple-rlp dependency and use internal copy 2023-10-11 13:04:26 +02:00
matejcik
b5c541d8fd style(python): extend style checks to more targets
[no changelog]
2023-08-16 13:29:51 +02:00
matejcik
b6c2f2e5ba feat(core): add hw_model field to vendor headers 2023-06-02 14:43:19 +02:00
Martin Novák
e6a7b9ccaa feat(python): support external Ethereum definitions 2023-03-24 13:24:46 +01:00
matejcik
a7482f4c6a refactor(python): convert firmware parsing to classes 2022-11-01 14:56:00 +01:00
matejcik
5977cca202 test(python): better dependency checking in tox 2022-06-30 14:57:25 +02:00
matejcik
38fca4a83d chore(python): regenerate GNU copyright headers 2021-12-07 16:55:58 +01:00
Jun Luo
b3ac52e98c refactor(python/stellar): Since the firmware does not support MuxedAccount, we refuse to process this type of transaction. 2021-11-04 13:16:29 +01:00
Jun Luo
62b649ef5d refactor(common & core & legacy): Stellar, rename StellarCreatePassiveOfferOp to StellarCreatePassiveSellOfferOp. 2021-11-04 13:16:29 +01:00
Jun Luo
d064aae3f9 feat(common & core & legacy): Stellar, add support for StellarPathPaymentStrictSendOp. 2021-11-04 13:16:29 +01:00
Jun Luo
1dcb8e4913 feat(common & core & legacy): Stellar, add support for StellarManageBuyOfferOp. 2021-11-04 13:16:29 +01:00
Jun Luo
3a5768c4bf refactor(common & core & legacy): Stellar, rename StellarManageOfferOp to StellarManageSellOfferOp and rename StellarPathPaymentOp to StellarPathPaymentStrictReceiveOp. 2021-11-04 13:16:29 +01:00
matejcik
91e8413c7e refactor(python): clean up test_stellar
- removed boilerplate
- shortened some names
- dropped distinction between v0 and v1 tests because there's now no XDR
parsing involved
- shortened test bodies to check only fields relevant to the particular
test case

[no changelog]
2021-09-24 10:30:19 +02:00
Jun Luo
1adc869626 fix(python/stellar): correct the data type passed to StellarAllowTrustOp.is_authorized.
[no changelog]
2021-08-11 14:15:27 +02:00
overcat
0dab2c5d1f test(python/stellar): add test cases for Stellar transactions in TransactionV1 format. 2021-08-06 13:14:57 +02:00
overcat
d664f85a12 test(python/stellar): fix and refactor existing test cases.
The XDR included in the existing test is not valid base64-encoded transaction envelope, and it cannot be decoded correctly, See https://laboratory.stellar.org/#xdr-viewer?input=AAAAABXWSL%2Fk028ZbPtXNf%2FYylTNS4Iz90PyJEnefPMBzbRpAAAAZAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAXVVkJGaxhbhDFS6eIZFR28WJICfsQBAaUXvtXKAwwuAAAAABVEVTVAAAAAAphJYCwg5YNl8SPBLYehykVQ0QzSGwrg4Y1E4%2BVv1qFQAAAAAdzxaYAAAAAA%3D%3D&type=TransactionEnvelope&network=test
2021-08-06 13:14:57 +02:00
Jun Luo
543b9f407c refactor(python/stellar): Use Stellar Python SDK to parse Stellar transactions.
As a side effect, support for TransactionV1 format transaction is added.
2021-08-06 13:14:57 +02:00
gabrielkerekes
4f7c6b3586 feat(common): change all protobuf message type hints to strings
In order to support recursive protobuf messages, which will be needed by Cardano's native scripts.
[no changelog]
2021-08-05 12:10:30 +02:00
matejcik
a58823cc0c refactor(python): rework trezorlib protobuf codec
API-compatibility with the original one is retained.

Now that we don't need to keep code parity with core, we could do some
changes that make life easier.

All generated classes are now in one file. This makes github diffs more
readable, at the cost of somewhat complicating inspecting individual
classes; however, that is something we shouldn't be doing anyway.

Enums are now implemented as enum.IntEnum.

The original class-level FIELDS member was restored.

Each field is now defined via protobuf.Field, which is easier to work
with in the codec, AND we're not stuffing defaults and flags into the
same field.
2021-06-08 09:55:19 +02:00
Pavol Rusnak
48d1a7a880
fix(python): append checksum to descriptors (#1445) 2021-02-05 17:46:02 +01:00
matejcik
3d6d1a56ac feat(python): implement API compatibility with trezorlib 0.12 2020-10-30 10:25:51 +01:00
matejcik
90ee5f3d38 feat!: implement protobuf required fields and default values
BREAKING CHANGE: this makes arguments to protobuf constructors
keyword-only, and arguments corresponding to required fields are now
mandatory
2020-09-23 16:00:10 +02:00
matejcik
9d29952a15 python: move out deprecated ckd_public 2020-03-26 11:30:06 +01:00
matejcik
325dae890e python: completely drop trezorlib.coins and trezorlib.tx_api 2020-03-26 11:30:06 +01:00
matejcik
5a526888cf python: move json_to_tx to btc.from_json, add test cases 2020-03-26 11:30:06 +01:00
Michail Brynard
c2635a4773 python: fix encoding errors in Stellar 2020-03-02 16:01:15 +01:00
matejcik
3959600760 python/protobuf: do not warn for unknown enum values (fixes #832) 2020-02-13 15:37:14 +01:00
matejcik
15bd35824b
python/cosi: improve API
cosi.verify was renamed to verify_combined, because it is pretty much
ed25519.verify, and the new name implies what it does in terms of the
CoSi scheme: verify a signature with already-combined public keys.

cosi.verify_m_of_n signature was simplified by not requiring the `n`
parameter, which is not important for verification. The updated function
was renamed to cosi.verify, because this is the standard CoSi
verification operation: given signature, digest, required number of
signatures, sigmask, and a list of public keys, verify that enough
signatures are indicated and that they sign the digest.
2020-01-20 17:32:58 +01:00
matejcik
8f2b22a8f5 python: add more protobuf tests 2019-11-18 11:50:07 +01:00
matejcik
6dc7985dc7
python: add more protobuf tests
also fix field numbers to start at 1
2019-08-22 18:15:28 +02:00
matejcik
67b879ac07 python: restructure package
This deserves some explanation.

* tests were moved to separate python/tests subdir
* trezorlib was moved to python/src, so that it does not exist on
PYTHONPATH by default
(see https://blog.ionelmc.ro/2014/05/25/python-packaging/ for details)
* everything was updated to understand the new structure
* trezorctl was changed from a top-level executable script to a module
`trezorlib.cli.trezorctl` and is installed via the entry_points
mechanism.
This should make it work normally on Windows!

The package should be installable as normal through pip and pipenv, no
changes are needed on that side.

The source package from pypi will include unit tests. (Device tests were
completely moved out). Wheel will exclude them, because users don't need
them.
That shrinks the .whl from 520 kB to 270 - nice!

python: reorganize remaining unit tests
2019-08-12 12:57:25 +02:00