Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.cpp
Show First 20 Lines • Show All 2,027 Lines • ▼ Show 20 Lines | bool DescriptorScriptPubKeyMan::SignTransaction( | ||||
return ::SignTransaction(tx, keys.get(), coins, sighash, input_errors); | return ::SignTransaction(tx, keys.get(), coins, sighash, input_errors); | ||||
} | } | ||||
SigningResult | SigningResult | ||||
DescriptorScriptPubKeyMan::SignMessage(const std::string &message, | DescriptorScriptPubKeyMan::SignMessage(const std::string &message, | ||||
const PKHash &pkhash, | const PKHash &pkhash, | ||||
std::string &str_sig) const { | std::string &str_sig) const { | ||||
std::unique_ptr<FlatSigningProvider> keys = | |||||
GetSigningProvider(GetScriptForDestination(pkhash), true); | |||||
if (!keys) { | |||||
return SigningResult::PRIVATE_KEY_NOT_AVAILABLE; | |||||
} | |||||
CKeyID key_id(pkhash); | |||||
CKey key; | |||||
if (!keys->GetKey(key_id, key)) { | |||||
return SigningResult::PRIVATE_KEY_NOT_AVAILABLE; | |||||
} | |||||
if (!MessageSign(key, message, str_sig)) { | |||||
return SigningResult::SIGNING_FAILED; | return SigningResult::SIGNING_FAILED; | ||||
} | } | ||||
return SigningResult::OK; | |||||
} | |||||
TransactionError | TransactionError | ||||
DescriptorScriptPubKeyMan::FillPSBT(PartiallySignedTransaction &psbt, | DescriptorScriptPubKeyMan::FillPSBT(PartiallySignedTransaction &psbt, | ||||
SigHashType sighash_type, bool sign, | SigHashType sighash_type, bool sign, | ||||
bool bip32derivs) const { | bool bip32derivs) const { | ||||
return TransactionError::INVALID_PSBT; | return TransactionError::INVALID_PSBT; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |