| 168 | |
| 169 | template<typename I> |
| 170 | std::optional<Key> FromPKBytes(I first, I last) const { |
| 171 | if (!miniscript::IsTapscript(m_script_ctx)) { |
| 172 | Key key{first, last}; |
| 173 | if (key.IsValid()) return key; |
| 174 | return {}; |
| 175 | } |
| 176 | if (last - first != 32) return {}; |
| 177 | XOnlyPubKey xonly_pubkey; |
| 178 | std::copy(first, last, xonly_pubkey.begin()); |
| 179 | return xonly_pubkey.GetEvenCorrespondingCPubKey(); |
| 180 | } |
| 181 | |
| 182 | template<typename I> |
| 183 | std::optional<Key> FromPKHBytes(I first, I last) const { |
nothing calls this directly
no test coverage detected