aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-02-01 18:53:24 -0800
committerPieter Wuille <pieter@wuille.net>2021-05-24 12:14:16 -0700
commit90fcac365e1616779b40a69736428435df75fdf2 (patch)
treecd748aee9785aa861c723cac5712ef3b1c796f4f /src/pubkey.cpp
parent5f6cc8daa83700d1c949d968a5cf0d935be337b7 (diff)
downloadbitcoin-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/pubkey.cpp')
-rw-r--r--src/pubkey.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pubkey.cpp b/src/pubkey.cpp
index 8382897f95..51cc826b00 100644
--- a/src/pubkey.cpp
+++ b/src/pubkey.cpp
@@ -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);