5#ifndef BITCOIN_WALLET_COINCONTROL_H
6#define BITCOIN_WALLET_COINCONTROL_H
41 std::optional<unsigned int>
m_pos;
71 std::pair<std::optional<CScript>, std::optional<CScriptWitness>>
GetScripts()
const;
167 std::pair<std::optional<CScript>, std::optional<CScriptWitness>>
GetScripts(
const COutPoint& outpoint)
const;
180 return it->second.GetPosition();
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
An outpoint - a combination of a transaction hash and an index n into its vout.
Serialized script, used inside transaction inputs and outputs.
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 IsSelected(const COutPoint &outpoint) const
Returns true if the given output is pre-selected.
std::optional< CTxOut > GetExternalOutput(const COutPoint &outpoint) const
Returns the external output for the given outpoint if it exists.
std::optional< unsigned int > m_confirm_target
Override the default confirmation target if set.
std::map< COutPoint, PreselectedInput > m_selected
Selected inputs (inputs that will be used, regardless of whether they're optimal or not)
std::optional< int > m_max_tx_weight
Caps weight of resulting tx.
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 HasSelectedOrder() const
std::optional< int64_t > GetInputWeight(const COutPoint &outpoint) const
Returns the input weight.
void UnSelectAll()
Unselects all outputs.
void UnSelect(const COutPoint &outpoint)
Unselects the given output.
std::optional< unsigned int > GetSelectionPos(const COutPoint &outpoint) const
PreselectedInput & Select(const COutPoint &outpoint)
Lock-in the given output for spending.
bool HasSelected() const
Returns true if there are pre-selected inputs.
bool IsExternalSelected(const COutPoint &outpoint) const
Returns true if the given output is selected as an external input.
std::pair< std::optional< CScript >, std::optional< CScriptWitness > > GetScripts(const COutPoint &outpoint) const
Retrieves the scriptSig and scriptWitness for an input.
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< uint32_t > m_version
Version.
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.
unsigned int m_selection_pos
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.
std::optional< uint32_t > m_locktime
Locktime.
std::optional< uint32_t > GetSequence(const COutPoint &outpoint) const
Retrieve the sequence for an input.
@ 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