9#include <secp256k1_schnorrsig.h>
14 secp256k1_keypair keypair{};
15 [[maybe_unused]]
const auto create_ret
16 = ::secp256k1_keypair_create(ctx, &keypair, privkey.data());
17 assert(create_ret == 1);
19 secp256k1_xonly_pubkey xpub{};
20 [[maybe_unused]]
const auto xonly_ret
21 = ::secp256k1_keypair_xonly_pub(ctx, &xpub,
nullptr, &keypair);
22 assert(xonly_ret == 1);
25 [[maybe_unused]]
const auto ser_ret
26 = ::secp256k1_xonly_pubkey_serialize(ctx, pubkey.data(), &xpub);
struct secp256k1_context_struct secp256k1_context
std::array< unsigned char, pubkey_len > privkey_t
A private key of a public/private keypair.
auto pubkey_from_privkey(const privkey_t &privkey, secp256k1_context *ctx) -> pubkey_t
Generates a public key from the specified private key.
std::array< unsigned char, pubkey_len > pubkey_t
A public key of a public/private keypair.