pub trait HWI: Debug {
fn device_type(&self) -> DeviceType;
fn is_connected<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_fingerprint<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Fingerprint, Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_extended_pubkey<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 DerivationPath
) -> Pin<Box<dyn Future<Output = Result<ExtendedPubKey, Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn register_wallet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
policy: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn sign_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut Psbt
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
Expand description
HWI is the common Hardware Wallet Interface.
Required Methods
fn device_type(&self) -> DeviceType
sourcefn is_connected<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn is_connected<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Check that the device is connected but not necessarily available.
sourcefn get_fingerprint<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Fingerprint, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_fingerprint<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Fingerprint, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get master fingerprint.
sourcefn get_extended_pubkey<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 DerivationPath
) -> Pin<Box<dyn Future<Output = Result<ExtendedPubKey, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_extended_pubkey<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 DerivationPath
) -> Pin<Box<dyn Future<Output = Result<ExtendedPubKey, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get the xpub with the given derivation path.
sourcefn register_wallet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
policy: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn register_wallet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
policy: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Register a new wallet policy