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

Method SignMessage

src/wallet/wallet.cpp:2213–2223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2211}
2212
2213SigningResult CWallet::SignMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) const
2214{
2215 SignatureData sigdata;
2216 CScript script_pub_key = GetScriptForDestination(pkhash);
2217 for (const auto& spk_man_pair : m_spk_managers) {
2218 if (spk_man_pair.second->CanProvide(script_pub_key, sigdata)) {
2219 return spk_man_pair.second->SignMessage(message, pkhash, str_sig);
2220 }
2221 }
2222 return SigningResult::PRIVATE_KEY_NOT_AVAILABLE;
2223}
2224
2225OutputType CWallet::TransactionChangeType(const std::optional<OutputType>& change_type, const std::vector<CRecipient>& vecSend) const
2226{

Callers 2

signMessageMethod · 0.45
signmessageFunction · 0.45

Calls 2

GetScriptForDestinationFunction · 0.85
CanProvideMethod · 0.45

Tested by

no test coverage detected