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