| 255 | } |
| 256 | |
| 257 | bool XOnlyPubKey::CheckTapTweak(const XOnlyPubKey& internal, const uint256& merkle_root, bool parity) const |
| 258 | { |
| 259 | secp256k1_xonly_pubkey internal_key; |
| 260 | if (!secp256k1_xonly_pubkey_parse(secp256k1_context_static, &internal_key, internal.data())) return false; |
| 261 | uint256 tweak = internal.ComputeTapTweakHash(&merkle_root); |
| 262 | return secp256k1_xonly_pubkey_tweak_add_check(secp256k1_context_static, m_keydata.begin(), parity, &internal_key, tweak.begin()); |
| 263 | } |
| 264 | |
| 265 | std::optional<std::pair<XOnlyPubKey, bool>> XOnlyPubKey::CreateTapTweak(const uint256* merkle_root) const |
| 266 | { |
no test coverage detected