Trait ledger_zondax_generic::AppExt
source · [−]pub trait AppExt<E>: App where
E: Exchange + Send + Sync,
E::Error: Error, {
fn get_device_info<'life0, 'async_trait>(
transport: &'life0 E
) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, LedgerAppError<E::Error>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
{ ... }
fn get_app_info<'life0, 'async_trait>(
transport: &'life0 E
) -> Pin<Box<dyn Future<Output = Result<AppInfo, LedgerAppError<E::Error>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
{ ... }
fn get_version<'life0, 'async_trait>(
transport: &'life0 E
) -> Pin<Box<dyn Future<Output = Result<Version, LedgerAppError<E::Error>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Send + 'async_trait,
{ ... }
fn send_chunks<'life0, 'life1, 'async_trait, I>(
transport: &'life0 E,
command: APDUCommand<I>,
message: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<E::AnswerType>, LedgerAppError<E::Error>>> + Send + 'async_trait>>
where
I: 'async_trait + Deref<Target = [u8]> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
{ ... }
}
Expand description
Common commands for any given APP
This trait is automatically implemented for any type that implements App
Provided methods
fn get_device_info<'life0, 'async_trait>(
transport: &'life0 E
) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, LedgerAppError<E::Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
fn get_device_info<'life0, 'async_trait>(
transport: &'life0 E
) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, LedgerAppError<E::Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Retrieve the device info
Works only in the dashboard
Retrieve the app info
Works only in app (TOOD: dashboard support)
Retrieve the app version
fn send_chunks<'life0, 'life1, 'async_trait, I>(
transport: &'life0 E,
command: APDUCommand<I>,
message: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<E::AnswerType>, LedgerAppError<E::Error>>> + Send + 'async_trait>> where
I: 'async_trait + Deref<Target = [u8]> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_chunks<'life0, 'life1, 'async_trait, I>(
transport: &'life0 E,
command: APDUCommand<I>,
message: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<E::AnswerType>, LedgerAppError<E::Error>>> + Send + 'async_trait>> where
I: 'async_trait + Deref<Target = [u8]> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Stream a long request in chunks