30 releases

0.0.31 Mar 18, 2026
0.0.29 Jul 21, 2025
0.0.27 Feb 6, 2025
0.0.24 Oct 31, 2024
0.0.2 Nov 28, 2022

#2 in #hardware-wallet

Download history 406/week @ 2026-01-25 478/week @ 2026-02-01 754/week @ 2026-02-08 145/week @ 2026-02-15 324/week @ 2026-02-22 399/week @ 2026-03-01 600/week @ 2026-03-08 403/week @ 2026-03-15 461/week @ 2026-03-22 768/week @ 2026-03-29 1194/week @ 2026-04-05 806/week @ 2026-04-12 844/week @ 2026-04-19 788/week @ 2026-04-26 1762/week @ 2026-05-03 1171/week @ 2026-05-10

4,679 downloads per month
Used in 3 crates

Custom license

190KB
4.5K SLoC

async-hwi

Current Minimum Supported Rust Version: v1.81 (1.85 if coldcard feature enabled)

/// HWI is the common Hardware Wallet Interface.
#[async_trait]
pub trait HWI: Debug {
    /// 0. Return the device kind
    fn device_kind(&self) -> DeviceKind;
    /// 1. Application version or OS version.
    async fn get_version(&self) -> Result<Version, Error>;
    /// 2. Get master fingerprint.
    async fn get_master_fingerprint(&self) -> Result<Fingerprint, Error>;
    /// 3. Get the xpub with the given derivation path.
    async fn get_extended_pubkey(&self, path: &DerivationPath) -> Result<Xpub, Error>;
    /// 4. Register a new wallet policy
    async fn register_wallet(&self, name: &str, policy: &str) -> Result<Option<[u8; 32]>, Error>;
    /// 5. Returns true if the wallet is registered
    async fn is_wallet_registered(&self, name: &str, policy: &str) -> Result<bool, HWIError>;
    /// 6. Display an address on the device screen
    async fn display_address(&self, script: &AddressScript) -> Result<(), Error>;
    /// 7. Sign a partially signed bitcoin transaction (PSBT).
    async fn sign_tx(&self, tx: &mut Psbt) -> Result<(), Error>;
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AddressScript {
    /// Must be a bip86 path.
    P2TR(DerivationPath),
    /// Miniscript requires the policy be loaded into the device.
    Miniscript { index: u32, change: bool },
}

Supported devices

A Empty case means the method is unimplemented on the client or device side.

device 1 2 3 4 5 6 7
BitBox02^1 >= v9.15.0 >= v9.15.0 >= v9.15.0 >= v9.15.0 >= v9.15.0 >= v9.15.0 >= v9.15.0
Coldcard^2 >= v6.2.1X >= v6.2.1X >= v6.2.1X >= v6.2.1X >= v6.2.1X >= v6.2.1X >= v6.2.1X
Jade^3 >= v1.0.30 >= v1.0.30 >= v1.0.30 >= v1.0.30 >= v1.0.30 >= v1.0.30 >= v1.0.30
Ledger Nano S/S+^4 >= v2.1.2 >= v2.1.2 >= v2.1.2 >= v2.1.2 *check hmac presence >= v2.1.2 >= v2.1.2
Specter^5 >= v1.8.0 >= v1.8.0 >= v1.8.0 >= v1.8.0

Service Module

The service module provides automatic device discovery and management with support for multiple concurrent consumers. See SERVICE.md for detailed documentation and usage examples.

Dependencies

~12–29MB
~381K SLoC