Package org.ldk.structs
Class HTLCOutputInCommitment
- java.lang.Object
-
- org.ldk.structs.HTLCOutputInCommitment
-
public class HTLCOutputInCommitment extends Object
Information about an HTLC as it appears in a commitment transaction
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HTLCOutputInCommitment
clone()
Creates a copy of the HTLCOutputInCommitmentprotected void
finalize()
long
get_amount_msat()
The value, in msat, of the HTLC.int
get_cltv_expiry()
The CLTV lock-time at which this HTLC expires.boolean
get_offered()
Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction).byte[]
get_payment_hash()
The hash of the preimage which unlocks this HTLC.Option_u32Z
get_transaction_output_index()
The position within the commitment transactions' outputs.static HTLCOutputInCommitment
of(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, Option_u32Z transaction_output_index_arg)
Constructs a new HTLCOutputInCommitment given each fieldstatic Result_HTLCOutputInCommitmentDecodeErrorZ
read(byte[] ser)
Read a HTLCOutputInCommitment from a byte array, created by HTLCOutputInCommitment_writevoid
set_amount_msat(long val)
The value, in msat, of the HTLC.void
set_cltv_expiry(int val)
The CLTV lock-time at which this HTLC expires.void
set_offered(boolean val)
Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction).void
set_payment_hash(byte[] val)
The hash of the preimage which unlocks this HTLC.void
set_transaction_output_index(Option_u32Z val)
The position within the commitment transactions' outputs.byte[]
write()
Serialize the HTLCOutputInCommitment object into a byte array which can be read by HTLCOutputInCommitment_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_offered
public boolean get_offered()
Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction). Note that this is not the same as whether it is ountbound *from us*. To determine that you need to compare this value to whether the commitment transaction in question is that of the counterparty or our own.
-
set_offered
public void set_offered(boolean val)
Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction). Note that this is not the same as whether it is ountbound *from us*. To determine that you need to compare this value to whether the commitment transaction in question is that of the counterparty or our own.
-
get_amount_msat
public long get_amount_msat()
The value, in msat, of the HTLC. The value as it appears in the commitment transaction is this divided by 1000.
-
set_amount_msat
public void set_amount_msat(long val)
The value, in msat, of the HTLC. The value as it appears in the commitment transaction is this divided by 1000.
-
get_cltv_expiry
public int get_cltv_expiry()
The CLTV lock-time at which this HTLC expires.
-
set_cltv_expiry
public void set_cltv_expiry(int val)
The CLTV lock-time at which this HTLC expires.
-
get_payment_hash
public byte[] get_payment_hash()
The hash of the preimage which unlocks this HTLC.
-
set_payment_hash
public void set_payment_hash(byte[] val)
The hash of the preimage which unlocks this HTLC.
-
get_transaction_output_index
public Option_u32Z get_transaction_output_index()
The position within the commitment transactions' outputs. This may be None if the value is below the dust limit (in which case no output appears in the commitment transaction and the value is spent to additional transaction fees).
-
set_transaction_output_index
public void set_transaction_output_index(Option_u32Z val)
The position within the commitment transactions' outputs. This may be None if the value is below the dust limit (in which case no output appears in the commitment transaction and the value is spent to additional transaction fees).
-
of
public static HTLCOutputInCommitment of(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, Option_u32Z transaction_output_index_arg)
Constructs a new HTLCOutputInCommitment given each field
-
clone
public HTLCOutputInCommitment clone()
Creates a copy of the HTLCOutputInCommitment
-
write
public byte[] write()
Serialize the HTLCOutputInCommitment object into a byte array which can be read by HTLCOutputInCommitment_read
-
read
public static Result_HTLCOutputInCommitmentDecodeErrorZ read(byte[] ser)
Read a HTLCOutputInCommitment from a byte array, created by HTLCOutputInCommitment_write
-
-