Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 4,798 Lines • ▼ Show 20 Lines | static UniValue walletcreatefundedpsbt(const Config &config, | ||||
Amount fee; | Amount fee; | ||||
int change_position; | int change_position; | ||||
CMutableTransaction rawTx = | CMutableTransaction rawTx = | ||||
ConstructTransaction(config.GetChainParams(), request.params[0], | ConstructTransaction(config.GetChainParams(), request.params[0], | ||||
request.params[1], request.params[2]); | request.params[1], request.params[2]); | ||||
FundTransaction(pwallet, rawTx, fee, change_position, request.params[3]); | FundTransaction(pwallet, rawTx, fee, change_position, request.params[3]); | ||||
// Make a blank psbt | // Make a blank psbt | ||||
const CTransaction tx = CTransaction(rawTx); | PartiallySignedTransaction psbtx(rawTx); | ||||
PartiallySignedTransaction psbtx(tx); | |||||
// Fill transaction with out data but don't sign | // Fill transaction with out data but don't sign | ||||
bool bip32derivs = | bool bip32derivs = | ||||
request.params[4].isNull() ? false : request.params[4].get_bool(); | request.params[4].isNull() ? false : request.params[4].get_bool(); | ||||
bool complete = true; | bool complete = true; | ||||
const TransactionError err = | const TransactionError err = | ||||
FillPSBT(pwallet, psbtx, complete, SigHashType().withForkId(), false, | FillPSBT(pwallet, psbtx, complete, SigHashType().withForkId(), false, | ||||
bip32derivs); | bip32derivs); | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |