Package org.ldk.structs
Class Input
- java.lang.Object
-
- org.ldk.structs.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Inputclone()Creates a copy of the Inputbooleaneq(Input b)Checks if two Inputs contain equal inner contents.booleanequals(Object o)protected voidfinalize()OutPointget_outpoint()The unique identifier of the input.TxOutget_previous_utxo()The UTXO being spent by the input.longget_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.longhash()Generates a non-cryptographic 64-bit hash of the Input.inthashCode()static Inputof(OutPoint outpoint_arg, TxOut previous_utxo_arg, long satisfaction_weight_arg)Constructs a new Input given each fieldvoidset_outpoint(OutPoint val)The unique identifier of the input.voidset_previous_utxo(TxOut val)The UTXO being spent by the input.voidset_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.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
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
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the Input.
-
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.
-
-