Attach a context to our software signers
This allows the signer to know the signing context precisely without relying on heuristics on the psbt fields. Due to the context being static, we still have to look at the PSBT when producing taproot signatures to determine the set of leaf hashes that the key can sign for.
This commit is contained in:
@@ -197,7 +197,7 @@ where
|
||||
KeychainKind::External,
|
||||
get_checksum(&descriptor.to_string())?.as_bytes(),
|
||||
)?;
|
||||
let signers = Arc::new(SignersContainer::from(keymap));
|
||||
let signers = Arc::new(SignersContainer::build(keymap, &descriptor, &secp));
|
||||
let (change_descriptor, change_signers) = match change_descriptor {
|
||||
Some(desc) => {
|
||||
let (change_descriptor, change_keymap) =
|
||||
@@ -207,7 +207,11 @@ where
|
||||
get_checksum(&change_descriptor.to_string())?.as_bytes(),
|
||||
)?;
|
||||
|
||||
let change_signers = Arc::new(SignersContainer::from(change_keymap));
|
||||
let change_signers = Arc::new(SignersContainer::build(
|
||||
change_keymap,
|
||||
&change_descriptor,
|
||||
&secp,
|
||||
));
|
||||
// if !parsed.same_structure(descriptor.as_ref()) {
|
||||
// return Err(Error::DifferentDescriptorStructure);
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user