Add TaprootBuilder class

This class functions as a utility for building taproot outputs, from
internal key and script leaves.
This commit is contained in:
Pieter Wuille committed 2021-05-24 12:14:16 -07:00
1 parent 5f6cc8daa8
commit 90fcac365e
7 files changed
+262 -2

No files matched your search

+6
View File
@@ -180,6 +180,12 @@ XOnlyPubKey::XOnlyPubKey(Span<const unsigned char> bytes)
std::copy(bytes.begin(), bytes.end(), m_keydata.begin());
}
bool XOnlyPubKey::IsFullyValid() const
{
secp256k1_xonly_pubkey pubkey;
return secp256k1_xonly_pubkey_parse(secp256k1_context_verify, &pubkey, m_keydata.data());
}
bool XOnlyPubKey::VerifySchnorr(const uint256& msg, Span<const unsigned char> sigbytes) const
{
assert(sigbytes.size() == 64);