5 #ifndef BITCOIN_WALLET_COINCONTROL_H
6 #define BITCOIN_WALLET_COINCONTROL_H
An outpoint - a combination of a transaction hash and an index n into its vout.
An output of a transaction.
FeeEstimateMode m_fee_mode
Fee estimation mode to control arguments to estimateSmartFee.
std::optional< bool > m_signal_bip125_rbf
Override the wallet's m_signal_rbf if set.
bool HasInputWeight(const COutPoint &outpoint) const
Returns true if the input weight is set.
std::optional< CTxOut > GetExternalOutput(const COutPoint &outpoint) const
Returns the external output for the given outpoint if it exists.
int64_t GetInputWeight(const COutPoint &outpoint) const
Returns the input weight.
void Select(const COutPoint &output)
Lock-in the given output for spending.
std::optional< unsigned int > m_confirm_target
Override the default confirmation target if set.
void SelectExternal(const COutPoint &outpoint, const CTxOut &txout)
Lock-in the given output as an external input for spending because it is not in the wallet.
std::map< COutPoint, CTxOut > m_external_txouts
Map of external inputs to include in the transaction These are not in the wallet, so we need to track...
std::optional< OutputType > m_change_type
Override the default change type if set, ignored if destChange is set.
bool m_avoid_address_reuse
Forbids inclusion of dirty (previously used) addresses.
bool IsSelected(const COutPoint &output) const
Returns true if the given output is pre-selected.
std::set< COutPoint > m_selected_inputs
Selected inputs (inputs that will be used, regardless of whether they're optimal or not)
void UnSelectAll()
Unselects all outputs.
std::map< COutPoint, int64_t > m_input_weights
Map of COutPoints to the maximum weight for that input.
bool HasSelected() const
Returns true if there are pre-selected inputs.
int m_min_depth
Minimum chain depth value for coin availability.
bool m_allow_other_inputs
If true, the selection process can add extra unselected inputs from the wallet while requires all sel...
int m_max_depth
Maximum chain depth value for coin availability.
bool fOverrideFeeRate
Override automatic min/max checks on fee, m_feerate must be set if true.
void SetInputWeight(const COutPoint &outpoint, int64_t weight)
Set an input's weight.
std::optional< CFeeRate > m_feerate
Override the wallet's m_pay_tx_fee if set.
bool m_include_unsafe_inputs
If false, only safe inputs will be used.
bool m_avoid_partial_spends
Avoid partial use of funds sent to a given address.
bool fAllowWatchOnly
Includes watch only addresses which are solvable.
bool IsExternalSelected(const COutPoint &output) const
Returns true if the given output is selected as an external input.
FlatSigningProvider m_external_provider
SigningProvider that has pubkeys and scripts to do spend size estimation for external inputs.
CTxDestination destChange
Custom change destination, if not set an address is generated.
std::vector< COutPoint > ListSelected() const
List the selected inputs.
void UnSelect(const COutPoint &output)
Unselects the given output.
@ UNSET
Use default settings based on other criteria.
static constexpr bool DEFAULT_AVOIDPARTIALSPENDS
Default for -avoidpartialspends.
const int DEFAULT_MIN_DEPTH
const int DEFAULT_MAX_DEPTH
std::variant< CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown > CTxDestination
A txout script template with a specific destination.