mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 02:33:07 +02:00
Taproot descriptor inference
This commit is contained in:
@@ -327,4 +327,12 @@ public:
|
||||
TaprootSpendData GetSpendData() const;
|
||||
};
|
||||
|
||||
/** Given a TaprootSpendData and the output key, reconstruct its script tree.
|
||||
*
|
||||
* If the output doesn't match the spenddata, or if the data in spenddata is incomplete,
|
||||
* std::nullopt is returned. Otherwise, a vector of (depth, script, leaf_ver) tuples is
|
||||
* returned, corresponding to a depth-first traversal of the script tree.
|
||||
*/
|
||||
std::optional<std::vector<std::tuple<int, CScript, int>>> InferTaprootTree(const TaprootSpendData& spenddata, const XOnlyPubKey& output);
|
||||
|
||||
#endif // BITCOIN_SCRIPT_STANDARD_H
|
||||
|
||||
Reference in New Issue
Block a user