| 1245 | } |
| 1246 | |
| 1247 | std::unique_ptr<PubkeyProvider> InferXOnlyPubkey(const XOnlyPubKey& xkey, ParseScriptContext ctx, const SigningProvider& provider) |
| 1248 | { |
| 1249 | unsigned char full_key[CPubKey::COMPRESSED_SIZE] = {0x02}; |
| 1250 | std::copy(xkey.begin(), xkey.end(), full_key + 1); |
| 1251 | CPubKey pubkey(full_key); |
| 1252 | std::unique_ptr<PubkeyProvider> key_provider = std::make_unique<ConstPubkeyProvider>(0, pubkey, true); |
| 1253 | KeyOriginInfo info; |
| 1254 | if (provider.GetKeyOriginByXOnly(xkey, info)) { |
| 1255 | return std::make_unique<OriginPubkeyProvider>(0, std::move(info), std::move(key_provider)); |
| 1256 | } |
| 1257 | return key_provider; |
| 1258 | } |
| 1259 | |
| 1260 | std::unique_ptr<DescriptorImpl> InferScript(const CScript& script, ParseScriptContext ctx, const SigningProvider& provider) |
| 1261 | { |
no test coverage detected