Bitcoin
Functions
psbtwallet.h File Reference
#include <node/transaction.h>
#include <psbt.h>
#include <primitives/transaction.h>
#include <wallet/wallet.h>

Go to the source code of this file.

Functions

NODISCARD TransactionError FillPSBT (const CWallet *pwallet, PartiallySignedTransaction &psbtx, bool &complete, int sighash_type=1, bool sign=true, bool bip32derivs=false)
 

Function Documentation

◆ FillPSBT()

NODISCARD TransactionError FillPSBT ( const CWallet pwallet,
PartiallySignedTransaction psbtx,
bool &  complete,
int  sighash_type = 1,
bool  sign = true,
bool  bip32derivs = false 
)

Fills out a PSBT with information from the wallet. Fills in UTXOs if we have them. Tries to sign if sign=true. Sets complete if the PSBT is now complete (i.e. has all required signatures or signature-parts, and is ready to finalize.) Sets error and returns false if something goes wrong.

Parameters
[in]pwalletpointer to a wallet
[in]&psbtxreference to PartiallySignedTransaction to fill in
[out]&completeindicates whether the PSBT is now complete
[in]sighash_typethe sighash type to use when signing (if PSBT does not specify)
[in]signwhether to sign or not
[in]bip32derivswhether to fill in bip32 derivation information if available return error