Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 2,873 Lines • ▼ Show 20 Lines | TransactionError CWallet::FillPSBT(PartiallySignedTransaction &psbtx, | ||||
complete = true; | complete = true; | ||||
for (const auto &input : psbtx.inputs) { | for (const auto &input : psbtx.inputs) { | ||||
complete &= PSBTInputSigned(input); | complete &= PSBTInputSigned(input); | ||||
} | } | ||||
return TransactionError::OK; | return TransactionError::OK; | ||||
} | } | ||||
SigningResult CWallet::SignMessage(const std::string &message, | |||||
const PKHash &pkhash, | |||||
std::string &str_sig) const { | |||||
SignatureData sigdata; | |||||
CScript script_pub_key = GetScriptForDestination(pkhash); | |||||
for (const auto &spk_man_pair : m_spk_managers) { | |||||
if (spk_man_pair.second->CanProvide(script_pub_key, sigdata)) { | |||||
return spk_man_pair.second->SignMessage(message, pkhash, str_sig); | |||||
} | |||||
} | |||||
return SigningResult::PRIVATE_KEY_NOT_AVAILABLE; | |||||
} | |||||
bool CWallet::FundTransaction(CMutableTransaction &tx, Amount &nFeeRet, | bool CWallet::FundTransaction(CMutableTransaction &tx, Amount &nFeeRet, | ||||
int &nChangePosInOut, bilingual_str &error, | int &nChangePosInOut, bilingual_str &error, | ||||
bool lockUnspents, | bool lockUnspents, | ||||
const std::set<int> &setSubtractFeeFromOutputs, | const std::set<int> &setSubtractFeeFromOutputs, | ||||
CCoinControl coinControl) { | CCoinControl coinControl) { | ||||
std::vector<CRecipient> vecSend; | std::vector<CRecipient> vecSend; | ||||
// Turn the txout set into a CRecipient vector. | // Turn the txout set into a CRecipient vector. | ||||
▲ Show 20 Lines • Show All 1,998 Lines • Show Last 20 Lines |