Struct ledger_mob::tx::TransactionHandle
source · pub struct TransactionHandle<T: Device> { /* private fields */ }
Expand description
Handle to a hardware wallet configured for transaction execution
See DeviceHandle::transaction to create a TransactionHandle
Implementations§
source§impl<T: Device> TransactionHandle<T>
impl<T: Device> TransactionHandle<T>
source§impl<T: Device> TransactionHandle<T>
impl<T: Device> TransactionHandle<T>
sourcepub async fn memo_sign(
&self,
sender_subaddress_index: u64,
tx_public_key: &TxOutPublic,
target_subaddress: PublicSubaddress,
memo_type: &[u8; 2],
memo_data_sans_hmac: &[u8; 48]
) -> Result<[u8; 16], Error>
pub async fn memo_sign( &self, sender_subaddress_index: u64, tx_public_key: &TxOutPublic, target_subaddress: PublicSubaddress, memo_type: &[u8; 2], memo_data_sans_hmac: &[u8; 48] ) -> Result<[u8; 16], Error>
Asynchronously compute the HMAC signature for the provided memo and target address.
See [MemoHmacSigner] for the public blocking API.
source§impl<T: Device> TransactionHandle<T>
impl<T: Device> TransactionHandle<T>
source§impl<T: Device> TransactionHandle<T>
impl<T: Device> TransactionHandle<T>
sourcepub async fn view_subaddress(&self, index: u64) -> Result<ViewSubaddress, Error>
pub async fn view_subaddress(&self, index: u64) -> Result<ViewSubaddress, Error>
Asynchronously fetch a view subaddress by subaddress index, inheriting the account index from the transaction context.
See [Subaddress] trait for public (blocking) API
source§impl<T: Device + Send> TransactionHandle<T>
impl<T: Device + Send> TransactionHandle<T>
source§impl<T: Device + Send> TransactionHandle<T>
impl<T: Device + Send> TransactionHandle<T>
Trait Implementations§
source§impl<T: Device + Send> Device for TransactionHandle<T>
impl<T: Device + Send> Device for TransactionHandle<T>
Exchange impl on transaction context
source§fn request<'a, 'b, 'life0, 'async_trait, RESP>(
&'life0 mut self,
request: impl 'async_trait + ApduReq<'a> + Send,
buff: &'b mut [u8],
timeout: Duration
) -> Pin<Box<dyn Future<Output = Result<RESP, Error>> + Send + 'async_trait>>where
RESP: 'async_trait + ApduBase<'b>,
Self: 'async_trait,
'a: 'async_trait,
'b: 'async_trait,
'life0: 'async_trait,
fn request<'a, 'b, 'life0, 'async_trait, RESP>( &'life0 mut self, request: impl 'async_trait + ApduReq<'a> + Send, buff: &'b mut [u8], timeout: Duration ) -> Pin<Box<dyn Future<Output = Result<RESP, Error>> + Send + 'async_trait>>where RESP: 'async_trait + ApduBase<'b>, Self: 'async_trait, 'a: 'async_trait, 'b: 'async_trait, 'life0: 'async_trait,
Helper for executing transactions with the device
source§impl<T: Device> KeyImageComputer for TransactionHandle<T>
impl<T: Device> KeyImageComputer for TransactionHandle<T>
Sync [KeyImageComputer] implementation for TransactionHandle
Note: this MUST be called from a tokio context
source§impl<T: Device> MemoHmacSigner for TransactionHandle<T>
impl<T: Device> MemoHmacSigner for TransactionHandle<T>
Sync [MemoHmacSigner] implementation for TransactionHandle
Note: this MUST be called from a tokio context
source§impl<T: Device> RingSigner for TransactionHandle<T>
impl<T: Device> RingSigner for TransactionHandle<T>
Sync [RingSigner] implementation for TransactionHandle
Note: this MUST be called from a tokio context
source§impl<T: Device> Subaddress for TransactionHandle<T>
impl<T: Device> Subaddress for TransactionHandle<T>
Sync [Subaddress] implementation for TransactionHandle
Note: this MUST be called from a tokio context