| 233 | } |
| 234 | |
| 235 | bool 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 | |
| 243 | bool CPubKey::TweakMulVerify(const CPubKey& untweaked, const uint256& tweak) const |
| 244 | { |
no test coverage detected