MCPcopy Create free account
hub / github.com/ElementsProject/elements / CheckTapTweak

Method CheckTapTweak

src/pubkey.cpp:235–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235bool XOnlyPubKey::CheckTapTweak(const XOnlyPubKey& internal, const uint256& merkle_root, bool parity) const
236{
237 secp256k1_xonly_pubkey internal_key;
238 if (!secp256k1_xonly_pubkey_parse(secp256k1_context_verify, &internal_key, internal.data())) return false;
239 uint256 tweak = internal.ComputeTapTweakHash(&merkle_root);
240 return secp256k1_xonly_pubkey_tweak_add_check(secp256k1_context_verify, m_keydata.begin(), parity, &internal_key, tweak.begin());
241}
242
243bool CPubKey::TweakMulVerify(const CPubKey& untweaked, const uint256& tweak) const
244{

Callers 1

VerifyTaprootCommitmentFunction · 0.80

Calls 5

ComputeTapTweakHashMethod · 0.80
dataMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected