21 typedef std::vector<unsigned char>
valtype;
24 : m_txto{tx}, nIn{input_idx}, nHashType{hash_type}, amount{amount}, checker{&m_txto, nIn, amount,
MissingDataBehavior::FAIL},
30 : m_txto{tx}, nIn{input_idx}, nHashType{hash_type}, amount{amount},
42 if (!provider.
GetKey(address, key))
56 if (!key.
Sign(hash, vchSig))
58 vchSig.push_back((
unsigned char)hashtype);
80 if (!leaf_hash)
return false;
88 if (!key.
SignSchnorr(hash, sig, merkle_root, {}))
return false;
112 const auto it = sigdata.
signatures.find(address);
114 pubkey = it->second.first;
120 pubkey = pk_it->second.first;
123 const auto& tap_pk_it = sigdata.
tap_pubkeys.find(address);
125 pubkey = tap_pk_it->second.GetEvenCorrespondingCPubKey();
129 return provider.
GetPubKey(address, pubkey);
135 const auto it = sigdata.
signatures.find(keyid);
137 sig_out = it->second.second;
142 sigdata.
misc_pubkeys.emplace(keyid, std::make_pair(pubkey, std::move(info)));
144 if (creator.
CreateSig(provider, sig_out, keyid, scriptcode, sigversion)) {
160 sigdata.
taproot_misc_pubkeys.emplace(pubkey, std::make_pair(std::set<uint256>({leaf_hash}), info));
162 it->second.first.insert(leaf_hash);
166 auto lookup_key = std::make_pair(pubkey, leaf_hash);
169 sig_out = it->second;
172 if (creator.
CreateSchnorrSig(provider, sig_out, pubkey, &leaf_hash,
nullptr, sigversion)) {
179 template<
typename M,
typename K,
typename V>
182 auto it = map.find(key);
183 if (it != map.end()) {
194 template<
typename Pk>
221 assert(last - first == 20);
224 std::copy(first, last, key_id.
begin());
263 template <
typename I>
266 if (pubkey.IsValid())
return pubkey;
296 template <
typename I>
298 if (last - first != 32)
return {};
300 std::copy(first, last, pubkey.
begin());
356 std::vector<unsigned char> sig;
374 std::vector<std::vector<unsigned char>> smallest_result_stack;
376 const auto& [
script, leaf_ver] = key;
377 std::vector<std::vector<unsigned char>> result_stack;
379 result_stack.emplace_back(std::begin(
script), std::end(
script));
380 result_stack.push_back(*control_blocks.begin());
381 if (smallest_result_stack.size() == 0 ||
383 smallest_result_stack = std::move(result_stack);
387 if (smallest_result_stack.size() != 0) {
388 result = std::move(smallest_result_stack);
406 std::vector<unsigned char> sig;
408 std::vector<valtype> vSolutions;
409 whichTypeRet =
Solver(scriptPubKey, vSolutions);
411 switch (whichTypeRet) {
417 if (!
CreateSig(creator, sigdata, provider, sig,
CPubKey(vSolutions[0]), scriptPubKey, sigversion))
return false;
418 ret.push_back(std::move(sig));
423 if (!
GetPubKey(provider, sigdata, keyID, pubkey)) {
428 if (!
CreateSig(creator, sigdata, provider, sig, pubkey, scriptPubKey, sigversion))
return false;
429 ret.push_back(std::move(sig));
436 ret.emplace_back(scriptRet.
begin(), scriptRet.
end());
444 size_t required = vSolutions.front()[0];
446 for (
size_t i = 1; i < vSolutions.size() - 1; ++i) {
451 if (
CreateSig(creator, sigdata, provider, sig, pubkey, scriptPubKey, sigversion)) {
452 if (
ret.size() < required + 1) {
453 ret.push_back(std::move(sig));
457 bool ok =
ret.size() == required + 1;
458 for (
size_t i = 0; i +
ret.size() < required + 1; ++i) {
464 ret.push_back(vSolutions[0]);
469 ret.emplace_back(scriptRet.
begin(), scriptRet.
end());
491 }
else if (v.size() == 1 && v[0] >= 1 && v[0] <= 16) {
493 }
else if (v.size() == 1 && v[0] == 0x81) {
506 std::vector<valtype>
result;
545 if (!solved &&
result.empty()) {
546 WshSatisfier ms_satisfier{provider, sigdata, creator, witnessscript};
585 bool CheckECDSASignature(
const std::vector<unsigned char>& scriptSig,
const std::vector<unsigned char>& vchPubKey,
const CScript& scriptCode,
SigVersion sigversion)
const override 587 if (m_checker.CheckECDSASignature(scriptSig, vchPubKey, scriptCode, sigversion)) {
598 std::vector<valtype>
script;
599 std::vector<valtype> witness;
602 Stacks(
const Stacks&) =
delete;
614 data.scriptSig = tx.
vin[nIn].scriptSig;
615 data.scriptWitness = tx.
vin[nIn].scriptWitness;
620 SignatureExtractorChecker extractor_checker(
data, tx_checker);
622 data.complete =
true;
627 std::vector<std::vector<unsigned char>> solutions;
634 CScript redeem_script(stack.script.back().begin(), stack.script.back().end());
635 data.redeem_script = redeem_script;
636 next_script = std::move(redeem_script);
639 script_type =
Solver(next_script, solutions);
640 stack.script.pop_back();
644 CScript witness_script(stack.witness.back().begin(), stack.witness.back().end());
645 data.witness_script = witness_script;
646 next_script = std::move(witness_script);
649 script_type =
Solver(next_script, solutions);
650 stack.witness.pop_back();
651 stack.script = std::move(stack.witness);
652 stack.witness.clear();
657 assert(solutions.size() > 1);
659 unsigned int last_success_key = 0;
660 for (
const valtype& sig : stack.script) {
661 for (
unsigned int i = last_success_key; i <
num_pubkeys; ++i) {
662 const valtype& pubkey = solutions[i+1];
664 if (
data.signatures.count(
CPubKey(pubkey).GetID()) || extractor_checker.CheckECDSASignature(sig, pubkey, next_script, sigversion)) {
665 last_success_key = i + 1;
685 *
this = std::move(sigdata);
702 DummySignatureChecker() =
default;
703 bool CheckECDSASignature(
const std::vector<unsigned char>& sig,
const std::vector<unsigned char>& vchPubKey,
const CScript& scriptCode,
SigVersion sigversion)
const override {
return sig.size() != 0; }
718 DummySignatureCreator(
char r_len,
char s_len) : m_r_len(r_len), m_s_len(s_len) {}
723 vchSig.assign(m_r_len + m_s_len + 7,
'\000');
725 vchSig[1] = m_r_len + m_s_len + 4;
729 vchSig[4 + m_r_len] = 0x02;
730 vchSig[5 + m_r_len] = m_s_len;
731 vchSig[6 + m_r_len] = 0x01;
737 sig.assign(64,
'\000');
751 if (
script.IsWitnessProgram(version, program))
return true;
752 if (
script.IsPayToScriptHash()) {
753 std::vector<valtype> solutions;
756 auto h160 =
uint160(solutions[0]);
775 std::vector<CTxOut> spent_outputs;
776 for (
unsigned int i = 0; i < mtx.
vin.size(); ++i) {
778 auto coin = coins.find(txin.
prevout);
779 if (coin == coins.end() || coin->second.IsSpent()) {
780 txdata.
Init(txConst, {},
true);
783 spent_outputs.emplace_back(coin->second.out.nValue, coin->second.out.scriptPubKey);
786 if (spent_outputs.size() == mtx.
vin.size()) {
787 txdata.
Init(txConst, std::move(spent_outputs),
true);
791 for (
unsigned int i = 0; i < mtx.
vin.size(); ++i) {
793 auto coin = coins.find(txin.
prevout);
794 if (coin == coins.end() || coin->second.IsSpent()) {
795 input_errors[i] =
_(
"Input not found or already spent");
798 const CScript& prevPubKey = coin->second.out.scriptPubKey;
799 const CAmount& amount = coin->second.out.nValue;
803 if (!fHashSingle || (i < mtx.
vout.size())) {
811 input_errors[i] =
_(
"Missing amount");
819 input_errors[i] =
Untranslated(
"Unable to sign input, invalid stack size (possibly missing key)");
822 input_errors[i] =
Untranslated(
"CHECK(MULTI)SIG failing with non-zero signature (possibly need more signatures)");
828 input_errors.erase(i);
831 return input_errors.empty();
virtual bool CheckECDSASignature(const std::vector< unsigned char > &scriptSig, const std::vector< unsigned char > &vchPubKey, const CScript &scriptCode, SigVersion sigversion) const
Witness v0 (P2WPKH and P2WSH); see BIP 141.
virtual bool CheckLockTime(const CScriptNum &nLockTime) const
std::map< std::vector< uint8_t >, std::vector< uint8_t > > ripemd160_preimages
Mapping from a RIPEMD160 hash to its preimage provided to solve a Script.
Witness v1 with 32-byte program, not BIP16 P2SH-wrapped, key path spending; see BIP 341...
Context for solving a Miniscript.
bool SignatureHashSchnorr(uint256 &hash_out, ScriptExecutionData &execdata, const T &tx_to, uint32_t in_pos, uint8_t hash_type, SigVersion sigversion, const PrecomputedTransactionData &cache, MissingDataBehavior mdb)
static bool SignTaprootScript(const SigningProvider &provider, const BaseSignatureCreator &creator, SignatureData &sigdata, int leaf_version, Span< const unsigned char > script_bytes, std::vector< valtype > &result)
std::map< XOnlyPubKey, std::pair< std::set< uint256 >, KeyOriginInfo > > taproot_misc_pubkeys
Miscellaneous Taproot pubkeys involved in this input along with their leaf script hashes and key orig...
enum ScriptError_t ScriptError
CScript witness_script
The witnessScript (if any) for the input. witnessScripts are used in P2WSH outputs.
constexpr C * end() const noexcept
std::optional< CPubKey > FromPKBytes(I first, I last) const
Conversion from a raw compressed public key.
virtual bool CreateSig(const SigningProvider &provider, std::vector< unsigned char > &vchSig, const CKeyID &keyid, const CScript &scriptCode, SigVersion sigversion) const =0
Create a singular (non-script) signature.
const CMutableTransaction & m_txto
Taproot only; implied when sighash byte is missing, and equivalent to SIGHASH_ALL.
bool VerifyScript(const CScript &scriptSig, const CScript &scriptPubKey, const CScriptWitness *witness, unsigned int flags, const BaseSignatureChecker &checker, ScriptError *serror)
CScript scriptSig
The scriptSig of an input. Contains complete signatures or the traditional partial signatures format...
TxoutType Solver(const CScript &scriptPubKey, std::vector< std::vector< unsigned char >> &vSolutionsRet)
Parse a scriptPubKey and identify script type for standard scripts.
CScriptWitness scriptWitness
Only serialized through CTransaction.
size_t GetSerializeSize(const T &t)
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
virtual bool CheckSchnorrSignature(Span< const unsigned char > sig, Span< const unsigned char > pubkey, SigVersion sigversion, ScriptExecutionData &execdata, ScriptError *serror=nullptr) const
bool m_annex_present
Whether an annex is present.
std::vector< CKeyID > missing_sigs
KeyIDs of pubkeys for signatures which could not be found.
bool MoneyRange(const CAmount &nValue)
Interface for signature creators.
constexpr std::size_t size() const noexcept
static CScript PushAll(const std::vector< valtype > &values)
std::vector< CKeyID > missing_pubkeys
KeyIDs of pubkeys which could not be found.
const BaseSignatureCreator & DUMMY_SIGNATURE_CREATOR
A signature creator that just produces 71-byte empty signatures.
std::vector< std::vector< unsigned char > > stack
Satisfier(const SigningProvider &provider LIFETIMEBOUND, SignatureData &sig_data LIFETIMEBOUND, const BaseSignatureCreator &creator LIFETIMEBOUND, const CScript &witscript LIFETIMEBOUND, miniscript::MiniscriptContext script_ctx)
miniscript::Availability MsLookupHelper(const M &map, const K &key, V &value)
miniscript::Availability SatHASH160(const std::vector< unsigned char > &hash, std::vector< unsigned char > &preimage) const
const BaseSignatureCreator & DUMMY_MAXIMUM_SIGNATURE_CREATOR
A signature creator that just produces 72-byte empty signatures.
std::map< std::vector< uint8_t >, std::vector< uint8_t > > sha256_preimages
Mapping from a SHA256 hash to its preimage provided to solve a Script.
static constexpr uint8_t TAPROOT_LEAF_TAPSCRIPT
const uint256 & m_leaf_hash
bool CheckAfter(uint32_t value) const
Time lock satisfactions.
Bare scripts and BIP16 P2SH-wrapped redeemscripts.
Witness v1 with 32-byte program, not BIP16 P2SH-wrapped, script path spending, leaf version 0xc0; see...
SignatureData & m_sig_data
bool IsWitnessProgram(int &version, std::vector< unsigned char > &program) const
std::map< CKeyID, std::pair< CPubKey, KeyOriginInfo > > misc_pubkeys
static const int64_t values[]
A selection of numbers that do not trigger int64_t overflow when added/subtracted.
MutableTransactionSignatureCreator(const CMutableTransaction &tx LIFETIMEBOUND, unsigned int input_idx, const CAmount &amount, int hash_type)
A signature creator for transactions.
miniscript::Availability Sign(const CPubKey &key, std::vector< unsigned char > &sig) const
Satisfy an ECDSA signature check.
bool SignSchnorr(const uint256 &hash, Span< unsigned char > sig, const uint256 *merkle_root, const uint256 &aux) const
Create a BIP-340 Schnorr signature, for the xonly-pubkey corresponding to *this, optionally tweaked b...
uint160 RIPEMD160(Span< const unsigned char > data)
Compute the 160-bit RIPEMD-160 hash of an array.
consteval auto _(util::TranslatedLiteral str)
uint256 missing_witness_script
SHA256 of the missing witnessScript (if any)
static int tweak(const secp256k1_context *ctx, secp256k1_xonly_pubkey *agg_pk, secp256k1_musig_keyagg_cache *cache)
static constexpr unsigned int STANDARD_SCRIPT_VERIFY_FLAGS
Standard script verification flags that standard transactions will comply with.
bool IsSegWitOutput(const SigningProvider &provider, const CScript &script)
Check whether a scriptPubKey is known to be segwit.
miniscript::Availability SatSHA256(const std::vector< unsigned char > &hash, std::vector< unsigned char > &preimage) const
Hash preimage satisfactions.
uint32_t m_codeseparator_pos
Opcode position of the last executed OP_CODESEPARATOR (or 0xFFFFFFFF if none executed).
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
const BaseSignatureChecker & DUMMY_CHECKER
A signature checker that accepts all signatures.
static bool SignStep(const SigningProvider &provider, const BaseSignatureCreator &creator, const CScript &scriptPubKey, std::vector< valtype > &ret, TxoutType &whichTypeRet, SigVersion sigversion, SignatureData &sigdata)
Sign scriptPubKey using signature made with creator.
const unsigned char * begin() const
std::optional< CPubKey > CPubFromPKHBytes(I first, I last) const
Get a CPubKey from a key hash. Note the key hash may be of an xonly pubkey.
std::optional< XOnlyPubKey > FromPKBytes(I first, I last) const
Conversion from a raw xonly public key.
std::map< std::pair< XOnlyPubKey, uint256 >, std::vector< unsigned char > > taproot_script_sigs
Schnorr signature for key path spending.
constexpr unsigned char * begin()
bool GetKeyOriginByXOnly(const XOnlyPubKey &pubkey, KeyOriginInfo &info) const
std::vector< typename std::common_type< Args... >::type > Vector(Args &&... args)
Construct a vector with the specified elements.
bool CreateSig(const SigningProvider &provider, std::vector< unsigned char > &vchSig, const CKeyID &keyid, const CScript &scriptCode, SigVersion sigversion) const override
Create a singular (non-script) signature.
int64_t CAmount
Amount in satoshis (Can be negative)
bool Sign(const uint256 &hash, std::vector< unsigned char > &vchSig, bool grind=true, uint32_t test_case=0) const
Create a DER-serialized signature.
virtual bool GetTaprootSpendData(const XOnlyPubKey &output_key, TaprootSpendData &spenddata) const
bool m_annex_init
Whether m_annex_present and (when needed) m_annex_hash are initialized.
uint256 m_tapleaf_hash
The tapleaf hash.
uint160 missing_redeem_script
ScriptID of the missing redeemScript (if any)
static bool KeyCompare(const Key &a, const Key &b)
void Init(const T &tx, std::vector< CTxOut > &&spent_outputs, bool force=false)
Initialize this PrecomputedTransactionData with transaction data.
std::map< CKeyID, XOnlyPubKey > tap_pubkeys
Misc Taproot pubkeys involved in this input, by hash. (Equivalent of misc_pubkeys but for Taproot...
const unsigned char * begin() const
std::map< std::pair< std::vector< unsigned char >, int >, std::set< std::vector< unsigned char >, ShortestVectorFirstComparator > > scripts
Map from (script, leaf_version) to (sets of) control blocks.
virtual bool GetPubKey(const CKeyID &address, CPubKey &pubkey) const
const unsigned char * end() const
static bool SignTaproot(const SigningProvider &provider, const BaseSignatureCreator &creator, const WitnessV1Taproot &output, SignatureData &sigdata, std::vector< valtype > &result)
An input of a transaction.
virtual bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const
std::optional< CPubKey > FromPKHBytes(I first, I last) const
Conversion from a raw compressed public key hash.
virtual bool CreateSchnorrSig(const SigningProvider &provider, std::vector< unsigned char > &sig, const XOnlyPubKey &pubkey, const uint256 *leaf_hash, const uint256 *merkle_root, SigVersion sigversion) const =0
static bool CreateSig(const BaseSignatureCreator &creator, SignatureData &sigdata, const SigningProvider &provider, std::vector< unsigned char > &sig_out, const CPubKey &pubkey, const CScript &scriptcode, SigVersion sigversion)
An encapsulated public key.
std::optional< TaprootBuilder > tr_builder
Taproot tree used to build tr_spenddata.
std::string ScriptErrorString(const ScriptError serror)
miniscript::MiniscriptContext MsContext() const
std::pair< CPubKey, std::vector< unsigned char > > SigPair
Just act as if the signature was invalid.
static bool GetCScript(const SigningProvider &provider, const SignatureData &sigdata, const CScriptID &scriptid, CScript &script)
const CScript & m_witness_script
bool CheckECDSASignature(const std::vector< unsigned char > &scriptSig, const std::vector< unsigned char > &vchPubKey, const CScript &scriptCode, SigVersion sigversion) const override
An output of a transaction.
void MergeSignatureData(SignatureData sigdata)
bool IsCompressed() const
Check whether the public key corresponding to this private key is (to be) compressed.
uint256 merkle_root
The Merkle root of the script tree (0 if no scripts).
bool m_bip341_taproot_ready
Whether the 5 fields above are initialized.
std::vector< CTxOut > vout
virtual bool GetCScript(const CScriptID &scriptid, CScript &script) const
uint256 ComputeTapleafHash(uint8_t leaf_version, Span< const unsigned char > script)
Compute the BIP341 tapleaf hash from leaf version & script.
CScriptWitness scriptWitness
The scriptWitness of an input. Contains complete signatures or the traditional partial signatures for...
bool m_codeseparator_pos_init
Whether m_codeseparator_pos is initialized.
virtual bool GetKey(const CKeyID &address, CKey &key) const
std::map< std::vector< uint8_t >, std::vector< uint8_t > > hash256_preimages
Mapping from a HASH256 hash to its preimage provided to solve a Script.
Utility class to construct Taproot outputs from internal key and script tree.
std::vector< unsigned char > valtype
Miniscript satisfier specific to P2WSH context.
constexpr C * begin() const noexcept
std::vector< unsigned char > ToByteVector(const T &in)
miniscript::Availability SatRIPEMD160(const std::vector< unsigned char > &hash, std::vector< unsigned char > &preimage) const
std::map< std::vector< uint8_t >, std::vector< uint8_t > > hash160_preimages
Mapping from a HASH160 hash to its preimage provided to solve a Script.
An interface to be implemented by keystores that support signing.
static opcodetype EncodeOP_N(int n)
SignatureData DataFromTransaction(const CMutableTransaction &tx, unsigned int nIn, const CTxOut &txout)
Extract signature data from a transaction input, and insert it.
Serialized script, used inside transaction inputs and outputs.
XOnlyPubKey internal_key
The BIP341 internal key.
const miniscript::MiniscriptContext m_script_ctx
The context of the script we are satisfying (either P2WSH or Tapscript).
static bool GetPubKey(const SigningProvider &provider, const SignatureData &sigdata, const CKeyID &address, CPubKey &pubkey)
bool m_spent_outputs_ready
Whether m_spent_outputs is initialized.
bool CreateSchnorrSig(const SigningProvider &provider, std::vector< unsigned char > &sig, const XOnlyPubKey &pubkey, const uint256 *leaf_hash, const uint256 *merkle_root, SigVersion sigversion) const override
const SigningProvider & m_provider
uint256 SignatureHash(const CScript &scriptCode, const T &txTo, unsigned int nIn, int32_t nHashType, const CAmount &amount, SigVersion sigversion, const PrecomputedTransactionData *cache)
A reference to a CKey: the Hash160 of its serialized public key.
void UpdateInput(CTxIn &input, const SignatureData &data)
static bool CreateTaprootScriptSig(const BaseSignatureCreator &creator, SignatureData &sigdata, const SigningProvider &provider, std::vector< unsigned char > &sig_out, const XOnlyPubKey &pubkey, const uint256 &leaf_hash, SigVersion sigversion)
static constexpr CAmount MAX_MONEY
No amount larger than this (in satoshi) is valid.
virtual bool CheckSequence(const CScriptNum &nSequence) const
std::vector< unsigned char > valtype
std::optional< XOnlyPubKey > FromPKHBytes(I first, I last) const
Conversion from a raw xonly public key hash.
bool ProduceSignature(const SigningProvider &provider, const BaseSignatureCreator &creator, const CScript &fromPubKey, SignatureData &sigdata)
Produce a script signature using a generic signature creator.
bool m_tapleaf_hash_init
Whether m_tapleaf_hash is initialized.
TapSatisfier(const SigningProvider &provider LIFETIMEBOUND, SignatureData &sig_data LIFETIMEBOUND, const BaseSignatureCreator &creator LIFETIMEBOUND, const CScript &script LIFETIMEBOUND, const uint256 &leaf_hash LIFETIMEBOUND)
A reference to a CScript: the Hash160 of its serialization.
A mutable version of CTransaction.
An encapsulated private key.
bool GetKeyByXOnly(const XOnlyPubKey &pubkey, CKey &key) const
The basic transaction that is broadcasted on the network and contained in blocks. ...
bool CheckOlder(uint32_t value) const
NodeRef< typename Ctx::Key > FromScript(const CScript &script, const Ctx &ctx)
const PrecomputedTransactionData * m_txdata
std::vector< unsigned char > taproot_key_path_sig
bool EvalScript(std::vector< std::vector< unsigned char > > &stack, const CScript &script, unsigned int flags, const BaseSignatureChecker &checker, SigVersion sigversion, ScriptExecutionData &execdata, ScriptError *serror)
bool complete
Stores whether the scriptSig and scriptWitness are complete.
std::vector< unsigned char > ToPKBytes(const Key &key) const
Conversion to raw public key.
Only for Witness versions not already defined above.
miniscript::Availability SatHASH256(const std::vector< unsigned char > &hash, std::vector< unsigned char > &preimage) const
virtual bool GetTaprootBuilder(const XOnlyPubKey &output_key, TaprootBuilder &builder) const
miniscript::Availability Sign(const XOnlyPubKey &key, std::vector< unsigned char > &sig) const
Satisfy a BIP340 signature check.
bool SignTransaction(CMutableTransaction &mtx, const SigningProvider *keystore, const std::map< COutPoint, Coin > &coins, int nHashType, std::map< int, bilingual_str > &input_errors)
Sign the CMutableTransaction.
const BaseSignatureCreator & m_creator
CScript redeem_script
The redeemScript (if any) for the input.
bool witness
Stores whether the input this SigData corresponds to is a witness input.
WshSatisfier(const SigningProvider &provider LIFETIMEBOUND, SignatureData &sig_data LIFETIMEBOUND, const BaseSignatureCreator &creator LIFETIMEBOUND, const CScript &witscript LIFETIMEBOUND)
Miniscript satisfier specific to Tapscript context.
std::map< CKeyID, SigPair > signatures
BIP 174 style partial signatures for the input. May contain all signatures necessary for producing a ...
virtual const BaseSignatureChecker & Checker() const =0
void Merge(TaprootSpendData other)
Merge other TaprootSpendData (for the same scriptPubKey) into this.
unspendable OP_RETURN script that carries data
TaprootSpendData tr_spenddata
Taproot spending data.