Class CoinSelection


  • public class CoinSelection
    extends Object
    The result of a successful coin selection attempt for a transaction requiring additional UTXOs to cover its fees.
    • Method Detail

      • get_confirmed_utxos

        public Utxo[] get_confirmed_utxos()
        The set of UTXOs (with at least 1 confirmation) to spend and use within a transaction requiring additional fees.
      • set_confirmed_utxos

        public void set_confirmed_utxos​(Utxo[] val)
        The set of UTXOs (with at least 1 confirmation) to spend and use within a transaction requiring additional fees.
      • get_change_output

        public Option_TxOutZ get_change_output()
        An additional output tracking whether any change remained after coin selection. This output should always have a value above dust for its given `script_pubkey`. It should not be spent until the transaction it belongs to confirms to ensure mempool descendant limits are not met. This implies no other party should be able to spend it except us.
      • set_change_output

        public void set_change_output​(Option_TxOutZ val)
        An additional output tracking whether any change remained after coin selection. This output should always have a value above dust for its given `script_pubkey`. It should not be spent until the transaction it belongs to confirms to ensure mempool descendant limits are not met. This implies no other party should be able to spend it except us.
      • of

        public static CoinSelection of​(Utxo[] confirmed_utxos_arg,
                                       Option_TxOutZ change_output_arg)
        Constructs a new CoinSelection given each field