2023-09-29 18:13:00 +00:00
|
|
|
//! Bindings for Trezor protobufs.
|
2023-06-18 04:26:46 +00:00
|
|
|
|
2023-09-29 18:13:00 +00:00
|
|
|
// Note: we do not use the generated `mod.rs` because we want to feature-gate some modules manually.
|
|
|
|
// This significantly improves compile times.
|
|
|
|
// See https://github.com/joshieDo/rust-trezor-api/pull/9 for more details.
|
2023-06-18 04:26:46 +00:00
|
|
|
#[allow(ambiguous_glob_reexports)]
|
2023-09-29 18:13:00 +00:00
|
|
|
mod generated {
|
|
|
|
macro_rules! modules {
|
|
|
|
($($($feature:literal =>)? $module:ident)+) => {$(
|
|
|
|
$(#[cfg(feature = $feature)])?
|
|
|
|
mod $module;
|
|
|
|
$(#[cfg(feature = $feature)])?
|
|
|
|
pub use self::$module::*;
|
|
|
|
)+};
|
|
|
|
}
|
2023-06-18 04:26:46 +00:00
|
|
|
|
2023-09-29 18:13:00 +00:00
|
|
|
modules! {
|
|
|
|
messages
|
|
|
|
messages_bootloader
|
|
|
|
messages_common
|
|
|
|
messages_crypto
|
|
|
|
messages_debug
|
|
|
|
messages_management
|
2023-06-18 04:26:46 +00:00
|
|
|
|
2023-09-29 18:13:00 +00:00
|
|
|
"bitcoin" => messages_bitcoin
|
|
|
|
"ethereum" => messages_ethereum
|
|
|
|
"ethereum" => messages_ethereum_eip712
|
|
|
|
"ethereum" => messages_ethereum_definitions
|
|
|
|
"binance" => messages_binance
|
|
|
|
"cardano" => messages_cardano
|
|
|
|
"eos" => messages_eos
|
|
|
|
"monero" => messages_monero
|
|
|
|
"nem" => messages_nem
|
|
|
|
"ripple" => messages_ripple
|
|
|
|
"stellar" => messages_stellar
|
|
|
|
"tezos" => messages_tezos
|
|
|
|
"webauthn" => messages_webauthn
|
|
|
|
}
|
2023-06-18 04:26:46 +00:00
|
|
|
}
|
2023-09-29 18:13:00 +00:00
|
|
|
|
|
|
|
pub use generated::*;
|