From 35e72b0f3b8db6ed15109624e509207adff745cd Mon Sep 17 00:00:00 2001 From: Salvatore Ingala <6681844+bigspider@users.noreply.github.com> Date: Wed, 20 Mar 2024 09:57:52 +0100 Subject: [PATCH 1/2] Fix wrong deserialization of yielded signatures for keypath spends --- bitcoin_client_rs/src/psbt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoin_client_rs/src/psbt.rs b/bitcoin_client_rs/src/psbt.rs index fabfb250a..8708a64e9 100644 --- a/bitcoin_client_rs/src/psbt.rs +++ b/bitcoin_client_rs/src/psbt.rs @@ -411,13 +411,13 @@ impl PartialSignature { .map_err(PartialSignatureError::XOnlyPubKey)?; let tap_leaf_hash = TapLeafHash::from_slice(&slice[33..65]).map_err(PartialSignatureError::TapLeaf)?; - let sig = taproot::Signature::from_slice(&slice[65..]) + let sig = taproot::Signature::from_slice(&slice[key_augment_len + 1..]) .map_err(PartialSignatureError::TaprootSig)?; Ok(Self::TapScriptSig(key, Some(tap_leaf_hash), sig)) } else if key_augment_len == 32 { let key = XOnlyPublicKey::from_slice(&slice[1..33]) .map_err(PartialSignatureError::XOnlyPubKey)?; - let sig = taproot::Signature::from_slice(&slice[65..]) + let sig = taproot::Signature::from_slice(&slice[key_augment_len + 1..]) .map_err(PartialSignatureError::TaprootSig)?; Ok(Self::TapScriptSig(key, None, sig)) } else { From 9ecf4f076bc27d906dcb1ea577ac14b68cf65a91 Mon Sep 17 00:00:00 2001 From: Salvatore Ingala <6681844+bigspider@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:08:06 +0100 Subject: [PATCH 2/2] Bump rust client version to 0.4.1 --- bitcoin_client_rs/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin_client_rs/Cargo.toml b/bitcoin_client_rs/Cargo.toml index d68b72bd3..cb3325f15 100644 --- a/bitcoin_client_rs/Cargo.toml +++ b/bitcoin_client_rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ledger_bitcoin_client" -version = "0.4.0" +version = "0.4.1" authors = ["Edouard Paris "] edition = "2018" description = "Ledger Bitcoin application client"