Class Input


  • public class Input
    extends Object
    An input that must be included in a transaction when performing coin selection through [`CoinSelectionSource::select_confirmed_utxos`]. It is guaranteed to be a SegWit input, so it must have an empty [`TxIn::script_sig`] when spent.
    • Method Detail

      • get_outpoint

        public OutPoint get_outpoint()
        The unique identifier of the input.
      • set_outpoint

        public void set_outpoint​(OutPoint val)
        The unique identifier of the input.
      • get_previous_utxo

        public TxOut get_previous_utxo()
        The UTXO being spent by the input.
      • set_previous_utxo

        public void set_previous_utxo​(TxOut val)
        The UTXO being spent by the input.
      • get_satisfaction_weight

        public long get_satisfaction_weight()
        The upper-bound weight consumed by the input's full [`TxIn::script_sig`] and [`TxIn::witness`], each with their lengths included, required to satisfy the output's script.
      • set_satisfaction_weight

        public void set_satisfaction_weight​(long val)
        The upper-bound weight consumed by the input's full [`TxIn::script_sig`] and [`TxIn::witness`], each with their lengths included, required to satisfy the output's script.
      • of

        public static Input of​(OutPoint outpoint_arg,
                               TxOut previous_utxo_arg,
                               long satisfaction_weight_arg)
        Constructs a new Input given each field
      • clone

        public Input clone()
        Creates a copy of the Input
        Overrides:
        clone in class Object
      • hash

        public long hash()
        Generates a non-cryptographic 64-bit hash of the Input.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • eq

        public boolean eq​(Input b)
        Checks if two Inputs contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.