pub struct EthApp<E: Exchange> { /* private fields */ }
Implementations§
Source§impl<E> EthApp<E>
impl<E> EthApp<E>
Sourcepub async fn configuration(
&self,
) -> Result<AppConfiguration, EthError<E::Error>>
pub async fn configuration( &self, ) -> Result<AppConfiguration, EthError<E::Error>>
Retrieves the app configuration
Source§impl<E> EthApp<E>
impl<E> EthApp<E>
Sourcepub async fn provide_erc20_token_info(
&self,
data: &[u8],
) -> Result<(), EthError<E::Error>>
pub async fn provide_erc20_token_info( &self, data: &[u8], ) -> Result<(), EthError<E::Error>>
This command provides a trusted description of an ERC 20 token to associate a contract address with a ticker and number of decimals. It shall be run immediately before performing a transaction involving a contract calling this contract address to display the proper token information to the user if necessary, as marked in GET APP CONFIGURATION flags. The signature is computed on ticker || address || number of decimals (uint4be) || chainId (uint4be) signed by the following secp256k1 public key 0482bbf2f34f367b2e5bc21847b6566f21f0976b22d3388a9a5e446ac62d25cf725b62a2555b2dd464a4da0ab2f4d506820543af1d242470b1b1a969a27578f353
Source§impl<E> EthApp<E>
impl<E> EthApp<E>
pub async fn send_chunks( &self, command: APDUCommand<Vec<u8>>, ) -> Result<APDUAnswer<E::AnswerType>, LedgerAppError<E::Error>>
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for EthApp<E>where
E: Freeze,
impl<E> RefUnwindSafe for EthApp<E>where
E: RefUnwindSafe,
impl<E> Send for EthApp<E>where
E: Send,
impl<E> Sync for EthApp<E>where
E: Sync,
impl<E> Unpin for EthApp<E>where
E: Unpin,
impl<E> UnwindSafe for EthApp<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T, E> AppExt<E> for T
impl<T, E> AppExt<E> for T
Source§fn get_device_info<'life0, 'async_trait>(
transport: &'life0 E,
) -> Pin<Box<dyn Future<Output = Result<DeviceInfo, LedgerAppError<<E as Exchange>::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 as Exchange>::Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Retrieve the device info Read more
Source§fn get_app_info<'life0, 'async_trait>(
transport: &'life0 E,
) -> Pin<Box<dyn Future<Output = Result<AppInfo, LedgerAppError<<E as Exchange>::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 as Exchange>::Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Retrieve the app info Read more
Source§fn get_version<'life0, 'async_trait>(
transport: &'life0 E,
) -> Pin<Box<dyn Future<Output = Result<Version, LedgerAppError<<E as Exchange>::Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
fn get_version<'life0, 'async_trait>(
transport: &'life0 E,
) -> Pin<Box<dyn Future<Output = Result<Version, LedgerAppError<<E as Exchange>::Error>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
Retrieve the app version
Source§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 as Exchange>::AnswerType>, LedgerAppError<<E as Exchange>::Error>>> + 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 as Exchange>::AnswerType>, LedgerAppError<<E as Exchange>::Error>>> + Send + 'async_trait>>
Stream a long request in chunks
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more