MCPcopy Create free account
hub / github.com/ElementsProject/elements / InferPubkey

Function InferPubkey

src/script/descriptor.cpp:1237–1245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235}
1236
1237std::unique_ptr<PubkeyProvider> InferPubkey(const CPubKey& pubkey, ParseScriptContext, const SigningProvider& provider)
1238{
1239 std::unique_ptr<PubkeyProvider> key_provider = std::make_unique<ConstPubkeyProvider>(0, pubkey, false);
1240 KeyOriginInfo info;
1241 if (provider.GetKeyOrigin(pubkey.GetID(), info)) {
1242 return std::make_unique<OriginPubkeyProvider>(0, std::move(info), std::move(key_provider));
1243 }
1244 return key_provider;
1245}
1246
1247std::unique_ptr<PubkeyProvider> InferXOnlyPubkey(const XOnlyPubKey& xkey, ParseScriptContext ctx, const SigningProvider& provider)
1248{

Callers 1

InferScriptFunction · 0.85

Calls 2

GetKeyOriginMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected