diff options
Diffstat (limited to 'src/pubkey.h')
-rw-r--r-- | src/pubkey.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pubkey.h b/src/pubkey.h index 4de1807a7f..152a48dd18 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -237,6 +237,9 @@ public: /** Construct an x-only pubkey from exactly 32 bytes. */ explicit XOnlyPubKey(Span<const unsigned char> bytes); + /** Construct an x-only pubkey from a normal pubkey. */ + explicit XOnlyPubKey(const CPubKey& pubkey) : XOnlyPubKey(Span<const unsigned char>(pubkey.begin() + 1, pubkey.begin() + 33)) {} + /** Verify a Schnorr signature against this public key. * * sigbytes must be exactly 64 bytes. |