[#wallet-CCoinControl]
= xref:wallet.adoc[wallet]::CCoinControl
:relfileprefix: ../
:mrdocs:

Coin Control Features&period;

== Synopsis

Declared in `&lt;wallet&sol;coincontrol&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CCoinControl;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CCoinControl/2constructor.adoc[`CCoinControl`]         [.small]#[constructor]#
| Construct a coin control with default settings&period;
| xref:wallet/CCoinControl/GetExternalOutput.adoc[`GetExternalOutput`] 
| Returns the external output for the given outpoint if it exists&period;
| xref:wallet/CCoinControl/GetInputWeight.adoc[`GetInputWeight`] 
| Returns the input weight&period;
| xref:wallet/CCoinControl/GetScripts.adoc[`GetScripts`] 
| Retrieves the scriptSig and scriptWitness for an input&period;
| xref:wallet/CCoinControl/GetSelectionPos.adoc[`GetSelectionPos`] 
| Returns the selection order position stored for the given pre&hyphen;selected output, if any&period;
| xref:wallet/CCoinControl/GetSequence.adoc[`GetSequence`] 
| Retrieve the sequence for an input
| xref:wallet/CCoinControl/HasSelected.adoc[`HasSelected`] 
| Returns true if there are pre&hyphen;selected inputs&period;
| xref:wallet/CCoinControl/HasSelectedOrder.adoc[`HasSelectedOrder`] 
| Returns true if any pre&hyphen;selected input has a stored selection order position&period;
| xref:wallet/CCoinControl/IsExternalSelected.adoc[`IsExternalSelected`] 
| Returns true if the given output is selected as an external input&period;
| xref:wallet/CCoinControl/IsSelected.adoc[`IsSelected`] 
| Returns true if the given output is pre&hyphen;selected&period;
| xref:wallet/CCoinControl/ListSelected.adoc[`ListSelected`] 
| List the selected inputs&period;
| xref:wallet/CCoinControl/Select.adoc[`Select`] 
| Lock&hyphen;in the given output for spending&period; The output will be included in the transaction even if it&apos;s not the most optimal choice&period;
| xref:wallet/CCoinControl/SetInputWeight.adoc[`SetInputWeight`] 
| Set an input&apos;s weight&period;
| xref:wallet/CCoinControl/UnSelect.adoc[`UnSelect`] 
| Unselects the given output&period;
| xref:wallet/CCoinControl/UnSelectAll.adoc[`UnSelectAll`] 
| Unselects all outputs&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:wallet/CCoinControl/destChange.adoc[`destChange`] 
| Custom change destination, if not set an address is generated
| xref:wallet/CCoinControl/fOverrideFeeRate.adoc[`fOverrideFeeRate`] 
| Override automatic min&sol;max checks on fee, m&lowbar;feerate must be set if true
| xref:wallet/CCoinControl/m_allow_other_inputs.adoc[`m&lowbar;allow&lowbar;other&lowbar;inputs`] 
| If true, the selection process can add extra unselected inputs from the wallet while requires all selected inputs be used
| xref:wallet/CCoinControl/m_avoid_address_reuse.adoc[`m&lowbar;avoid&lowbar;address&lowbar;reuse`] 
| Forbids inclusion of dirty (previously used) addresses
| xref:wallet/CCoinControl/m_avoid_partial_spends.adoc[`m&lowbar;avoid&lowbar;partial&lowbar;spends`] 
| Avoid partial use of funds sent to a given address
| xref:wallet/CCoinControl/m_change_type.adoc[`m&lowbar;change&lowbar;type`] 
| Override the default change type if set, ignored if destChange is set
| xref:wallet/CCoinControl/m_confirm_target.adoc[`m&lowbar;confirm&lowbar;target`] 
| Override the default confirmation target if set
| xref:wallet/CCoinControl/m_external_provider.adoc[`m&lowbar;external&lowbar;provider`] 
| SigningProvider that has pubkeys and scripts to do spend size estimation for external inputs
| xref:wallet/CCoinControl/m_fee_mode.adoc[`m&lowbar;fee&lowbar;mode`] 
| Fee estimation mode&period;
| xref:wallet/CCoinControl/m_feerate.adoc[`m&lowbar;feerate`] 
| Override the wallet&apos;s fee rate if set
| xref:wallet/CCoinControl/m_include_unsafe_inputs.adoc[`m&lowbar;include&lowbar;unsafe&lowbar;inputs`] 
| If false, only safe inputs will be used
| xref:wallet/CCoinControl/m_locktime.adoc[`m&lowbar;locktime`] 
| Locktime
| xref:wallet/CCoinControl/m_max_depth.adoc[`m&lowbar;max&lowbar;depth`] 
| Maximum chain depth value for coin availability
| xref:wallet/CCoinControl/m_max_tx_weight.adoc[`m&lowbar;max&lowbar;tx&lowbar;weight`] 
| Caps weight of resulting tx
| xref:wallet/CCoinControl/m_min_depth.adoc[`m&lowbar;min&lowbar;depth`] 
| Minimum chain depth value for coin availability
| xref:wallet/CCoinControl/m_signal_bip125_rbf.adoc[`m&lowbar;signal&lowbar;bip125&lowbar;rbf`] 
| Override the wallet&apos;s m&lowbar;signal&lowbar;rbf if set
| xref:wallet/CCoinControl/m_version.adoc[`m&lowbar;version`] 
| Version
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
