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
- introduce table-driven 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
+89-65Lines changed: 89 additions & 65 deletions
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,7 @@ impl GetKey for DescriptorSecretKey {
174
174
mod tests {
175
175
use core::str::FromStr;
176
176
177
-
use bitcoin::bip32::{ChildNumber,DerivationPath,IntoDerivationPath,Xpriv};
177
+
use bitcoin::bip32::{ChildNumber,DerivationPath,Fingerprint,IntoDerivationPath,Xpriv};
178
178
179
179
usesuper::*;
180
180
usecrate::Descriptor;
@@ -311,70 +311,6 @@ mod tests {
311
311
assert_eq!(got_sk, want_sk)
312
312
}
313
313
314
-
#[test]
315
-
fnget_key_xpriv_with_key_origin_and_wildcard(){
316
-
let secp = Secp256k1::new();
317
-
318
-
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`.
463
+
let descriptor = "wpkh([d34db33f/84h/1h/0h]tprv8ZgxMBicQKsPd3EupYiPRhaMooHKUHJxNsTfYuScep13go8QFfHdtkG9nRkFGb7busX4isf6X9dURGCoKgitaApQ6MupRhZMcELAxTBRJgS/0)";
0 commit comments