ed25519raw is moved back to trezorlib
ed25519cosi is renamed to cosi, and has a couple more functions,
with the expectation that TrezorClient.cosi_* methods will move there.
Also most code shouldn't need ed25519raw for anything, so it might get
renamed to "_ed25519" to indicate that it's a private implementation.
For now, I added a "verify" method to cosi, so that you don't need to
call into ed25519raw.checkvalid. But trezor-core's keyctl is also
using ed25519raw.publickey. I'm not sure if that's worth replicating
in cosi, or whether to just leave it be, so I'm leaving it be for now.
Importantly, new function "sign_with_privkey" does that math thing that
was part of the selftest and is also explicitly listed in keyctl.
(it's called sign_with_privkey because I expect to have a "sign" method
here that calls into Trezor)
We only need ethereum libraries for `ethereum_sign_tx` in trezorctl,
and rlp has caused us dependency problems in the past already.
Also we required ethjsonrpc for the same thing but never listed
that dependency anywhere.
That changes now.
This drops the command line options. `libusb` is now required
unconditionally (it's cffi so no harm there). hidapi is an extra.
You either need to install it manually, or specify it in your
requirements.txt like so:
trezor[hidapi] >= 0.9.2
So, 'python setup.py develop' exists. And of course it doesn't have build_py as
a dependency, because of course it doesn't.
We could use 'data_files' instead of 'package_data and copying', and then use
pkg_resources to find the actual file location, and that could work in theory.
But pkg_resources API is weird and messy and this whole area of Python
packaging theory barely works as it is.
Instead we will force the prebuild command to be a dependency of develop as
well as build_py, and we do this by monkey-patching instead of the proper way,
because at this point it seems cleaner. I wonder if there are more commands
that would need this.