Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 339a776

Browse files
Merge #51: Revert "Revert "Bump to rust-bitcoin 0.29.1""
c6e8810 ci: Trezor emulator needs rust nightly (Daniela Brozzoni) 0aae38c Revert "Revert "Bump to rust-bitcoin 0.29.1"" (Daniela Brozzoni) Pull request description: This reverts commit 80990d7. ACKs for top commit: afilini: ACK c6e8810 Tree-SHA512: 86ebc9e7aa28d671298e290b35cdd5dedb3f3d0d71e8d3f1fef3d9edd279cc13070593e1f0a6afa629c08ea8a6d5f300bad67cf24a52b3a73f50deed88cfe1d8
2 parents 5a0bb9f + c6e8810 commit 339a776

5 files changed

Lines changed: 9 additions & 6 deletions

File tree

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
once_cell = "=1.14"
1819

1920
[dev-dependencies]

ci/Dockerfile.trezor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM rust
22

3+
RUN rustup toolchain install nightly
4+
RUN rustup default nightly
35
RUN apt-get update
46
RUN apt-get install scons libsdl2-dev python3 python3-pip libsdl2-image-dev llvm-dev libclang-dev clang protobuf-compiler libusb-1.0-0-dev -y
57
RUN git clone --recursive https://github.com/trezor/trezor-firmware/ trezor-firmware

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)