diff options
author | Pieter Wuille <pieter@wuille.net> | 2021-02-01 18:53:24 -0800 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2021-05-24 12:14:16 -0700 |
commit | 90fcac365e1616779b40a69736428435df75fdf2 (patch) | |
tree | cd748aee9785aa861c723cac5712ef3b1c796f4f /src/script/interpreter.h | |
parent | 5f6cc8daa83700d1c949d968a5cf0d935be337b7 (diff) | |
download | bitcoin-90fcac365e1616779b40a69736428435df75fdf2.tar.xz |
Add TaprootBuilder class
This class functions as a utility for building taproot outputs, from
internal key and script leaves.
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r-- | src/script/interpreter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 212de17c7b..fa4ee83e04 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -6,6 +6,7 @@ #ifndef BITCOIN_SCRIPT_INTERPRETER_H #define BITCOIN_SCRIPT_INTERPRETER_H +#include <hash.h> #include <script/script_error.h> #include <span.h> #include <primitives/transaction.h> @@ -218,6 +219,9 @@ static constexpr size_t TAPROOT_CONTROL_NODE_SIZE = 32; static constexpr size_t TAPROOT_CONTROL_MAX_NODE_COUNT = 128; static constexpr size_t TAPROOT_CONTROL_MAX_SIZE = TAPROOT_CONTROL_BASE_SIZE + TAPROOT_CONTROL_NODE_SIZE * TAPROOT_CONTROL_MAX_NODE_COUNT; +extern const CHashWriter HASHER_TAPLEAF; //!< Hasher with tag "TapLeaf" pre-fed to it. +extern const CHashWriter HASHER_TAPBRANCH; //!< Hasher with tag "TapBranch" pre-fed to it. + template <class T> uint256 SignatureHash(const CScript& scriptCode, const T& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache = nullptr); |