mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 06:32:33 +01:00
Add XOnlyPubKey::CreateTapTweak
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <uint256.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
const unsigned int BIP32_EXTKEY_SIZE = 74;
|
||||
@@ -251,6 +252,9 @@ public:
|
||||
* Merkle root, and parity. */
|
||||
bool CheckTapTweak(const XOnlyPubKey& internal, const uint256& merkle_root, bool parity) const;
|
||||
|
||||
/** Construct a Taproot tweaked output point with this point as internal key. */
|
||||
std::optional<std::pair<XOnlyPubKey, bool>> CreateTapTweak(const uint256* merkle_root) const;
|
||||
|
||||
const unsigned char& operator[](int pos) const { return *(m_keydata.begin() + pos); }
|
||||
const unsigned char* data() const { return m_keydata.begin(); }
|
||||
static constexpr size_t size() { return decltype(m_keydata)::size(); }
|
||||
|
||||
Reference in New Issue
Block a user