steps:
- name: Checkout
uses: actions/checkout@v7
+ - name: Install system dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libudev-dev libusb-1.0-0-dev pkg-config
- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v2
with:
steps:
- name: Checkout
uses: actions/checkout@v7
-
+ - name: Install system dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libudev-dev libusb-1.0-0-dev pkg-config
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v2
with:
url = { version = "2.5.8", optional = true }
bdk_message_signer = { version = "0.2.0", optional = true }
bitcoin-payment-instructions = { version = "0.7.0", optional = true}
-async-hwi = { version = "0.0.32", features = ["specter", "coldcard", "ledger", "jade", "bitbox", "services"], optional = true}
+async-hwi = { version = "0.0.32", features = ["specter", "coldcard", "ledger", "jade", "bitbox", "service"], optional = true}
[features]
default = ["repl", "sqlite"]
#[cfg(not(feature = "hwi"))]
const DEFAULT_OFFLINE_SIGNER: bool = false;
-
impl OfflineWalletSubCommand {
pub fn execute(&self, ctx: &mut AppContext<OfflineOperations<'_>>) -> Result<(), Error> {
match self {
pub shrink_address: Option<Address>,
/// Make a PSBT that can be signed by offline signers and hardware wallets. Forces the addition of `non_witness_utxo` and more details to let the signer identify the change output.
- #[arg(long = "offline_signer", default_value_t = DEFAULT_OFFLINE_SIGNER))]
+ #[arg(long = "offline_signer", default_value_t = DEFAULT_OFFLINE_SIGNER)]
pub offline_signer: bool,
/// Selects which utxos *must* be added to the tx. Unconfirmed utxos cannot be used.
let device = device.with_network(network);
match device.get_info().await {
Ok(info) => {
- if info.jade_state == jade::api::JadeState::Locked {
- if let Err(e) = device.auth().await {
- warn!("Jade authentication failed: {e:?}");
- continue;
- }
+ if info.jade_state == jade::api::JadeState::Locked
+ && let Err(e) = device.auth().await
+ {
+ warn!("Jade authentication failed: {e:?}");
+ continue;
}
devices.push(device.into());
}
for device_info in api.device_list() {
// BitBox02
- if async_hwi::bitbox::is_bitbox02(device_info) {
- if let Ok(handle) = device_info.open_device(&api) {
- if let Ok(pairing) =
- PairingBitbox02WithLocalCache::<runtime::TokioRuntime>::connect(handle, None)
- .await
- {
- if let Ok((device, _)) = pairing.wait_confirm().await {
- let mut bb02 = BitBox02::from(device).with_network(network);
- if let Some(policy) = wallet.policy {
- bb02 = bb02.with_policy(policy).map_err(map_device_err)?;
- }
- devices.push(bb02.into());
- }
- }
+ if async_hwi::bitbox::is_bitbox02(device_info)
+ && let Ok(handle) = device_info.open_device(&api)
+ && let Ok(pairing) =
+ PairingBitbox02WithLocalCache::<runtime::TokioRuntime>::connect(handle, None).await
+ && let Ok((device, _)) = pairing.wait_confirm().await
+ {
+ let mut bb02 = BitBox02::from(device).with_network(network);
+ if let Some(policy) = wallet.policy {
+ bb02 = bb02.with_policy(policy).map_err(map_device_err)?;
}
+ devices.push(bb02.into());
}
// Coldcard
if device_info.vendor_id() == coldcard::api::COINKITE_VID
&& device_info.product_id() == coldcard::api::CKCC_PID
+ && let Some(sn) = device_info.serial_number()
{
- if let Some(sn) = device_info.serial_number() {
- match coldcard::api::Coldcard::open(&api, sn, None) {
- Ok((cc, _)) => {
- let mut hw = coldcard::Coldcard::from(cc);
- if let Some(name) = wallet.name {
- hw = hw.with_wallet_name(name.to_string());
- }
- devices.push(hw.into());
+ match coldcard::api::Coldcard::open(&api, sn, None) {
+ Ok((cc, _)) => {
+ let mut hw = coldcard::Coldcard::from(cc);
+ if let Some(name) = wallet.name {
+ hw = hw.with_wallet_name(name.to_string());
}
- Err(e) => warn!("Failed to open Coldcard (SN {sn}): {e:?}"),
+ devices.push(hw.into());
}
+ Err(e) => warn!("Failed to open Coldcard (SN {sn}): {e:?}"),
}
}
}