Skip to content

Commit 94fb6c7

Browse files
Merge #46: Bump to rust-bitcoin 0.29.1
91b8e3c Bump to rust-bitcoin 0.29.1 (Jose D Robles) Pull request description: I jump here because bdk have hwi as dependency and is not updated to rust-bitcoin, so i made this PR ACKs for top commit: danielabrozzoni: ACK 91b8e3c - thanks for taking care of this! Tree-SHA512: 8bccd441d52c2551d1d08a320ebb4f1c37885fcb22b931f3051b53a99c7e548e7b49bbdb072f5867c182381592b80fc33ff3e6b21985147e760b4e319bfa781e
2 parents ef819e7 + 91b8e3c commit 94fb6c7

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ repository = "https://github.com/bitcoindevkit/rust-hwi"
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
bitcoin = { version = "0.28", features = ["use-serde", "base64"] }
13+
bitcoin = { version = "0.29.1", features = ["serde", "base64"] }
1414
serde = { version = "^1.0", features = ["derive"] }
1515
serde_json = { version = "^1.0" }
1616
pyo3 = { version = "0.15.1", features = ["auto-initialize"]}
17+
base64 = "0.13.0"
1718

1819
[dev-dependencies]
1920
serial_test = "0.6.0"

src/interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bitcoin::consensus::encode::serialize;
55
use bitcoin::util::bip32::DerivationPath;
66
use bitcoin::util::psbt::PartiallySignedTransaction;
77

8-
use bitcoin::base64;
8+
use base64;
99

1010
use serde_json::value::Value;
1111

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ mod tests {
170170

171171
let previous_tx = Transaction {
172172
version: 1,
173-
lock_time: 0,
173+
lock_time: bitcoin::PackedLockTime(0),
174174
input: vec![TxIn::default()],
175175
output: vec![TxOut {
176176
value: 100,
@@ -188,7 +188,7 @@ mod tests {
188188
let psbt = bitcoin::psbt::PartiallySignedTransaction {
189189
unsigned_tx: Transaction {
190190
version: 1,
191-
lock_time: 0,
191+
lock_time: bitcoin::PackedLockTime(0),
192192
input: vec![previous_txin],
193193
output: vec![TxOut {
194194
value: 50,

src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct HWISignature {
3030

3131
fn from_b64<'de, D: Deserializer<'de>>(d: D) -> Result<Vec<u8>, D::Error> {
3232
let b64_string = String::deserialize(d)?;
33-
bitcoin::base64::decode(&b64_string)
33+
base64::decode(&b64_string)
3434
.map_err(|_| serde::de::Error::custom("Error while Deserializing Signature"))
3535
}
3636

@@ -57,7 +57,7 @@ fn deserialize_psbt<'de, D: Deserializer<'de>>(
5757
d: D,
5858
) -> Result<PartiallySignedTransaction, D::Error> {
5959
let b64_string = String::deserialize(d)?;
60-
let bytes = bitcoin::base64::decode(&b64_string).map_err(serde::de::Error::custom)?;
60+
let bytes = base64::decode(&b64_string).map_err(serde::de::Error::custom)?;
6161
bitcoin::consensus::deserialize::<PartiallySignedTransaction>(&bytes[..])
6262
.map_err(serde::de::Error::custom)
6363
}

0 commit comments

Comments
 (0)