|
|
|
@ -3848,13 +3848,18 @@ RPCHelpMan getaddressinfo()
|
|
|
|
|
isminetype mine = pwallet->IsMine(dest);
|
|
|
|
|
ret.pushKV("ismine", bool(mine & ISMINE_SPENDABLE));
|
|
|
|
|
|
|
|
|
|
bool solvable = provider && IsSolvable(*provider, scriptPubKey);
|
|
|
|
|
ret.pushKV("solvable", solvable);
|
|
|
|
|
|
|
|
|
|
if (solvable) {
|
|
|
|
|
ret.pushKV("desc", InferDescriptor(scriptPubKey, *provider)->ToString());
|
|
|
|
|
if (provider) {
|
|
|
|
|
auto inferred = InferDescriptor(scriptPubKey, *provider);
|
|
|
|
|
bool solvable = inferred->IsSolvable() || IsSolvable(*provider, scriptPubKey);
|
|
|
|
|
ret.pushKV("solvable", solvable);
|
|
|
|
|
if (solvable) {
|
|
|
|
|
ret.pushKV("desc", inferred->ToString());
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
ret.pushKV("solvable", false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DescriptorScriptPubKeyMan* desc_spk_man = dynamic_cast<DescriptorScriptPubKeyMan*>(pwallet->GetScriptPubKeyMan(scriptPubKey));
|
|
|
|
|
if (desc_spk_man) {
|
|
|
|
|
std::string desc_str;
|
|
|
|
|