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

Method SignMessage

src/wallet/scriptpubkeyman.cpp:623–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621}
622
623SigningResult LegacyScriptPubKeyMan::SignMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) const
624{
625 CKey key;
626 if (!GetKey(ToKeyID(pkhash), key)) {
627 return SigningResult::PRIVATE_KEY_NOT_AVAILABLE;
628 }
629
630 if (MessageSign(key, message, str_sig)) {
631 return SigningResult::OK;
632 }
633 return SigningResult::SIGNING_FAILED;
634}
635
636TransactionError LegacyScriptPubKeyMan::FillPSBT(PartiallySignedTransaction& psbtx, const PrecomputedTransactionData& txdata, int sighash_type, bool sign, bool bip32derivs, int* n_signed, bool finalize) const
637{

Callers

nothing calls this directly

Calls 4

ToKeyIDFunction · 0.85
MessageSignFunction · 0.85
GetScriptForDestinationFunction · 0.85
GetKeyMethod · 0.45

Tested by

no test coverage detected