diff options
author | Antoine Poinsot <darosior@protonmail.com> | 2023-02-24 16:34:12 +0100 |
---|---|---|
committer | Antoine Poinsot <darosior@protonmail.com> | 2023-10-08 02:43:24 +0200 |
commit | 4f473ea515bc77b9138323dab8a741c063d32e8f (patch) | |
tree | 9a69c9a7667cbcb18aca092761d2648b072dd04a /src/psbt.cpp | |
parent | febe2abc0e3f67b8b0ac9ece1890efb4a0bba83c (diff) |
script/sign: Miniscript support in Tapscript
We make the Satisfier a base in which to store the common methods
between the Tapscript and P2WSH satisfier, and from which they both
inherit.
A field is added to SignatureData to be able to satisfy pkh() under
Tapscript context (to get the pubkey hash preimage) without wallet data.
For instance in `finalizepsbt` RPC. See also the next commits for a
functional test that exercises this.
Diffstat (limited to 'src/psbt.cpp')
-rw-r--r-- | src/psbt.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/psbt.cpp b/src/psbt.cpp index 7ec9b9c136..76a2fd8241 100644 --- a/src/psbt.cpp +++ b/src/psbt.cpp @@ -132,6 +132,7 @@ void PSBTInput::FillSignatureData(SignatureData& sigdata) const } for (const auto& [pubkey, leaf_origin] : m_tap_bip32_paths) { sigdata.taproot_misc_pubkeys.emplace(pubkey, leaf_origin); + sigdata.tap_pubkeys.emplace(Hash160(pubkey), pubkey); } for (const auto& [hash, preimage] : ripemd160_preimages) { sigdata.ripemd160_preimages.emplace(std::vector<unsigned char>(hash.begin(), hash.end()), preimage); @@ -246,6 +247,7 @@ void PSBTOutput::FillSignatureData(SignatureData& sigdata) const } for (const auto& [pubkey, leaf_origin] : m_tap_bip32_paths) { sigdata.taproot_misc_pubkeys.emplace(pubkey, leaf_origin); + sigdata.tap_pubkeys.emplace(Hash160(pubkey), pubkey); } } |