From be5b382ab3543b72bebc925a54e24811f4c94314 Mon Sep 17 00:00:00 2001 From: Leonardo Lima Date: Sat, 4 May 2024 17:56:07 -0300 Subject: [PATCH 1/5] chore: upgrade `bitcoin` dependency to `0.32.0` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 942b65c..3f87d48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bitcoin = { version = "0.31.0", features = ["serde", "base64"] } +bitcoin = { version = "0.32", features = ["serde", "base64"] } serde = { version = "^1.0", features = ["derive"] } serde_json = { version = "^1.0" } pyo3 = { version = "0.21.2", features = ["auto-initialize"] } From c15e1a2ece853a3154a9c73bf1a83de54f8ca43d Mon Sep 17 00:00:00 2001 From: Leonardo Lima Date: Mon, 3 Jun 2024 21:21:16 -0300 Subject: [PATCH 2/5] chore: upgrade `miniscript` dependency to `0.12.0` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3f87d48..14d159d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = { version = "^1.0" } pyo3 = { version = "0.21.2", features = ["auto-initialize"] } -miniscript = { version = "11.0", features = ["serde"], optional = true } +miniscript = { version = "12.0", features = ["serde"], optional = true } [dev-dependencies] serial_test = "0.6.0" From 7afc15a1098b4b61feb2be4c0247cd758263c3b3 Mon Sep 17 00:00:00 2001 From: Leonardo Lima Date: Sat, 4 May 2024 18:01:44 -0300 Subject: [PATCH 3/5] fix: use `compute_txid()` instead of deprecated `txid()` --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 69c00cc..d549e92 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -225,7 +225,7 @@ mod tests { let previous_txin = TxIn { previous_output: bitcoin::OutPoint { - txid: previous_tx.txid(), + txid: previous_tx.compute_txid(), vout: Default::default(), }, ..Default::default() From ede9ea751519703221bab4ea485ef5e205de3da1 Mon Sep 17 00:00:00 2001 From: Leonardo Lima Date: Mon, 3 Jun 2024 21:53:42 -0300 Subject: [PATCH 4/5] fix: format `DerivationPath` w/ prefix `m/` when using as hwilib function argument --- src/interface.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/interface.rs b/src/interface.rs index c816bfb..e324bbe 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -224,8 +224,9 @@ impl HWIClient { path: &DerivationPath, expert: bool, ) -> Result { + let prefixed_path = format!("m/{}", path); Python::with_gil(|py| { - let func_args = (&self.hw_client, path.to_string(), expert); + let func_args = (&self.hw_client, prefixed_path, expert); let output = self .hwilib .commands @@ -242,8 +243,9 @@ impl HWIClient { message: &str, path: &DerivationPath, ) -> Result { + let prefixed_path = format!("m/{}", path); Python::with_gil(|py| { - let func_args = (&self.hw_client, message, path.to_string()); + let func_args = (&self.hw_client, message, prefixed_path); let output = self .hwilib .commands @@ -279,7 +281,7 @@ impl HWIClient { Python::with_gil(|py| { let mut p_str = py.None(); if let Some(p) = path { - p_str = format!("{}/*", p).into_py(py); + p_str = format!("m/{}/*", p).into_py(py); } let func_args = ( &self.hw_client, @@ -345,8 +347,9 @@ impl HWIClient { address_type: HWIAddressType, ) -> Result { Python::with_gil(|py| { + let prefixed_path = format!("m/{}", path); let descriptor = py.None(); - let func_args = (&self.hw_client, path.to_string(), descriptor, address_type); + let func_args = (&self.hw_client, prefixed_path, descriptor, address_type); let output = self .hwilib .commands From be7933a9f79f9a08cd0c2f0e44727c709efbe263 Mon Sep 17 00:00:00 2001 From: Leonardo Lima Date: Sat, 4 May 2024 17:56:37 -0300 Subject: [PATCH 5/5] chore: bump version to `0.9.0` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 14d159d..4acfc6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hwi" -version = "0.8.0" +version = "0.9.0" authors = ["Daniela Brozzoni "] edition = "2018" license = "MIT"