aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey.cpp')
-rw-r--r--src/pubkey.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pubkey.cpp b/src/pubkey.cpp
index 05808e4c22..11e1b4abb5 100644
--- a/src/pubkey.cpp
+++ b/src/pubkey.cpp
@@ -204,6 +204,13 @@ std::vector<CKeyID> XOnlyPubKey::GetKeyIDs() const
return out;
}
+CPubKey XOnlyPubKey::GetEvenCorrespondingCPubKey() const
+{
+ unsigned char full_key[CPubKey::COMPRESSED_SIZE] = {0x02};
+ std::copy(begin(), end(), full_key + 1);
+ return CPubKey{full_key};
+}
+
bool XOnlyPubKey::IsFullyValid() const
{
secp256k1_xonly_pubkey pubkey;