You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- backports introduced #872 table-driven test cases for
`get_key_xpriv_with_key_origin` with named fields
- drop redundant key parsing, and build requests from explicit
key sources
Assisted-by: Claude Opus 4.8
Copy file name to clipboardExpand all lines: src/descriptor/key_map.rs
+91-61Lines changed: 91 additions & 61 deletions
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ impl GetKey for DescriptorSecretKey {
119
119
mod tests {
120
120
use core::str::FromStr;
121
121
122
-
use bitcoin::bip32::{ChildNumber,DerivationPath,IntoDerivationPath,Xpriv};
122
+
use bitcoin::bip32::{ChildNumber,DerivationPath,Fingerprint,IntoDerivationPath,Xpriv};
123
123
124
124
usesuper::*;
125
125
usecrate::Descriptor;
@@ -260,66 +260,6 @@ mod tests {
260
260
assert_eq!(got_sk, want_sk)
261
261
}
262
262
263
-
#[test]
264
-
fnget_key_xpriv_with_key_origin_and_wildcard(){
265
-
let secp = Secp256k1::new();
266
-
267
-
let descriptor_str = "wpkh([d34db33f/84h/1h/0h]tprv8ZgxMBicQKsPd3EupYiPRhaMooHKUHJxNsTfYuScep13go8QFfHdtkG9nRkFGb7busX4isf6X9dURGCoKgitaApQ6MupRhZMcELAxTBRJgS/*)";
let descriptor_sk = DescriptorSecretKey::from_str("[d34db33f/84h/1h/0h]tprv8ZgxMBicQKsPd3EupYiPRhaMooHKUHJxNsTfYuScep13go8QFfHdtkG9nRkFGb7busX4isf6X9dURGCoKgitaApQ6MupRhZMcELAxTBRJgS/*").unwrap();
let descriptor_str = "wpkh([d34db33f/84h/1h/0h]tprv8ZgxMBicQKsPd3EupYiPRhaMooHKUHJxNsTfYuScep13go8QFfHdtkG9nRkFGb7busX4isf6X9dURGCoKgitaApQ6MupRhZMcELAxTBRJgS/0)";
let descriptor_sk = DescriptorSecretKey::from_str("[d34db33f/84h/1h/0h]tprv8ZgxMBicQKsPd3EupYiPRhaMooHKUHJxNsTfYuScep13go8QFfHdtkG9nRkFGb7busX4isf6X9dURGCoKgitaApQ6MupRhZMcELAxTBRJgS/0").unwrap();
let xpriv = Xpriv::from_str("tprv8ZgxMBicQKsPd3EupYiPRhaMooHKUHJxNsTfYuScep13go8QFfHdtkG9nRkFGb7busX4isf6X9dURGCoKgitaApQ6MupRhZMcELAxTBRJgS").unwrap();
// descriptor with a fixed derivation index of `0`.
412
+
let descriptor = "wpkh([d34db33f/84h/1h/0h]tprv8ZgxMBicQKsPd3EupYiPRhaMooHKUHJxNsTfYuScep13go8QFfHdtkG9nRkFGb7busX4isf6X9dURGCoKgitaApQ6MupRhZMcELAxTBRJgS/0)";
0 commit comments