| 1339 | } |
| 1340 | |
| 1341 | SigningResult DescriptorScriptPubKeyMan::SignMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) const |
| 1342 | { |
| 1343 | std::unique_ptr<FlatSigningProvider> keys = GetSigningProvider(GetScriptForDestination(pkhash), true); |
| 1344 | if (!keys) { |
| 1345 | return SigningResult::PRIVATE_KEY_NOT_AVAILABLE; |
| 1346 | } |
| 1347 | |
| 1348 | CKey key; |
| 1349 | if (!keys->GetKey(ToKeyID(pkhash), key)) { |
| 1350 | return SigningResult::PRIVATE_KEY_NOT_AVAILABLE; |
| 1351 | } |
| 1352 | |
| 1353 | if (!MessageSign(key, message, str_sig)) { |
| 1354 | return SigningResult::SIGNING_FAILED; |
| 1355 | } |
| 1356 | return SigningResult::OK; |
| 1357 | } |
| 1358 | |
| 1359 | std::optional<PSBTError> DescriptorScriptPubKeyMan::FillPSBT(PartiallySignedTransaction& psbtx, const PrecomputedTransactionData& txdata, const common::PSBTFillOptions& options, int* n_signed) const |
| 1360 | { |
nothing calls this directly
no test coverage detected