Crate trezor_client
source ·Expand description
§Trezor API library
§Connecting
Use the public top-level methods find_devices()
and unique()
to find devices. When using
find_devices()
, a list of different available devices is returned. To connect to one or more
of them, use their connect()
method.
§Logging
We use the log package interface, so any logger that supports log can be attached.
Please be aware that trace
logging can contain sensitive data.
Re-exports§
pub use client::ButtonRequest;
pub use client::ButtonRequestType;
pub use client::EntropyRequest;
pub use client::Features;
pub use client::PassphraseRequest;
pub use client::PinMatrixRequest;
pub use client::PinMatrixRequestType;
pub use client::Trezor;
pub use client::TrezorResponse;
pub use client::WordCount;
pub use error::Error;
pub use error::Result;
pub use protos::InputScriptType;
bitcoin
Modules§
- Error Handling
- Bindings for Trezor protobufs.
- utils
bitcoin
Structs§
- A device found by the
find_devices()
method. It can be connected to using theconnect()
method. - SignTxProgress
bitcoin
Object to track the progress in the transaction signing flow. The device will ask for various parts of the transaction and dependent transactions and can at any point also ask for user interaction. The information asked for by the device is provided based on a PSBT object and the resulting extra signatures are also added to the PSBT file.
Enums§
- The different kind of Trezor device models.
Traits§
- Extends the protobuf Message trait to also have a static getter for the message type code.
Functions§
- Search for all available devices. Most devices will show up twice both either debugging enables or disabled.
- Try to get a single device. Optionally specify whether debug should be enabled or not. Can error if there are multiple or no devices available. For more fine-grained device selection, use
find_devices()
. When using USB mode, the device will show up both with debug and without debug, so it’s necessary to specify the debug option in order to find a unique one.