async-hwi
#[async_trait]
pub trait HWI: Debug {
fn device_kind(&self) -> DeviceKind;
async fn get_version(&self) -> Result<Version, Error>;
async fn get_master_fingerprint(&self) -> Result<Fingerprint, Error>;
async fn get_extended_pubkey(&self, path: &DerivationPath) -> Result<ExtendedPubKey, Error>;
async fn register_wallet(&self, name: &str, policy: &str) -> Result<Option<[u8; 32]>, Error>;
async fn display_address(&self, script: &AddressScript) -> Result<(), Error>;
async fn sign_tx(&self, tx: &mut Psbt) -> Result<(), Error>;
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AddressScript {
P2TR(DerivationPath),
Miniscript { index: u32, change: bool },
}
Supported devices
A Empty case means the method is unimplemented on the client or device side.
|
BitBox02^1 |
Ledger Nano S/S+^2 |
Specter^3 |
get_version |
|
>= v2.1.2 |
|
get_master_fingerprint |
>= v9.15.0 |
>= v2.1.2 |
>= v1.8.0 |
get_extended_pubkey |
>= v9.15.0 |
>= v2.1.2 |
>= v1.8.0 |
register_wallet |
>= v9.15.0 |
>= v2.1.2 |
>= v1.8.0 |
display_address |
>= v9.15.0 |
>= v2.1.2 |
|
sign_tx |
>= v9.15.0 |
>= v2.1.2 |
>= v1.8.0 |