[#wallet-CoinsResult] = xref:wallet.adoc[wallet]::CoinsResult :relfileprefix: ../ :mrdocs: COutputs available for spending, stored by OutputType. This struct is really just a wrapper around OutputType vectors with a convenient method for concatenating and returning all COutputs as one vector. == Synopsis Declared in `<wallet/spend.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct CoinsResult; ---- == Description Size(), Erase(), Shuffle(), and Add() methods are implemented to allow easy interaction with the struct. == Member Functions [cols="1,4"] |=== | Name| Description | xref:wallet/CoinsResult/Add.adoc[`Add`] | Add a single output of the given type to the result. | xref:wallet/CoinsResult/All.adoc[`All`] | Concatenate and return all COutputs as one vector | xref:wallet/CoinsResult/Erase.adoc[`Erase`] | Remove the given outpoints from the stored coins. | xref:wallet/CoinsResult/GetAppropriateTotal.adoc[`GetAppropriateTotal`] | Returns the appropriate total based on whether fees are being subtracted from outputs. | xref:wallet/CoinsResult/GetEffectiveTotalAmount.adoc[`GetEffectiveTotalAmount`] | Return the sum of the effective value of all available coins, if known. | xref:wallet/CoinsResult/GetTotalAmount.adoc[`GetTotalAmount`] | Return the sum of the raw value of all available coins. | xref:wallet/CoinsResult/Shuffle.adoc[`Shuffle`] | Randomly shuffle the stored coins. | xref:wallet/CoinsResult/Size.adoc[`Size`] | The following methods are provided so that CoinsResult can mimic a vector, i.e., methods can work with individual OutputType vectors or on the entire object | xref:wallet/CoinsResult/TypesCount.adoc[`TypesCount`] | Return how many different output types this struct stores |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:wallet/CoinsResult/coins.adoc[`coins`] | Available outputs grouped by their output type. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:wallet/AvailableCoins.adoc[`AvailableCoins`] | Populate the CoinsResult struct with vectors of available COutputs, organized by OutputType. | xref:wallet/FetchSelectedInputs.adoc[`FetchSelectedInputs`] | Fetch and validate coin control selected inputs. Coins could be internal (from the wallet) or external. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#