Package org.ldk.structs
Class ChannelTransactionParameters
- java.lang.Object
-
- org.ldk.structs.ChannelTransactionParameters
-
public class ChannelTransactionParameters extends Object
Per-channel data used to build transactions in conjunction with the per-commitment data (CommitmentTransaction). The fields are organized by holder/counterparty. Normally, this is converted to the broadcaster/countersignatory-organized DirectedChannelTransactionParameters before use, via the as_holder_broadcastable and as_counterparty_broadcastable functions.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectedChannelTransactionParameters
as_counterparty_broadcastable()
Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters, given that the counterparty is the broadcaster.DirectedChannelTransactionParameters
as_holder_broadcastable()
Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters, given that the holder is the broadcaster.ChannelTransactionParameters
clone()
Creates a copy of the ChannelTransactionParametersboolean
eq(ChannelTransactionParameters b)
Checks if two ChannelTransactionParameterss contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
CounterpartyChannelTransactionParameters
get_counterparty_parameters()
The late-bound counterparty channel transaction parameters.OutPoint
get_funding_outpoint()
The late-bound funding outpoint Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent NoneChannelPublicKeys
get_holder_pubkeys()
Holder public keysshort
get_holder_selected_contest_delay()
The contest delay selected by the holder, which applies to counterparty-broadcast transactionsboolean
get_is_outbound_from_holder()
Whether the holder is the initiator of this channel.COption_NoneZ
get_opt_anchors()
Are anchors (zero fee HTLC transaction variant) used for this channel.COption_NoneZ
get_opt_non_zero_fee_anchors()
Are non-zero-fee anchors are enabled (used in conjuction with opt_anchors) It is intended merely for backwards compatibility with signers that need it.boolean
is_populated()
Whether the late bound parameters are populated.static ChannelTransactionParameters
of(ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_arg, COption_NoneZ opt_anchors_arg, COption_NoneZ opt_non_zero_fee_anchors_arg)
Constructs a new ChannelTransactionParameters given each fieldstatic Result_ChannelTransactionParametersDecodeErrorZ
read(byte[] ser)
Read a ChannelTransactionParameters from a byte array, created by ChannelTransactionParameters_writevoid
set_counterparty_parameters(CounterpartyChannelTransactionParameters val)
The late-bound counterparty channel transaction parameters.void
set_funding_outpoint(OutPoint val)
The late-bound funding outpoint Note that val (or a relevant inner pointer) may be NULL or all-0s to represent Nonevoid
set_holder_pubkeys(ChannelPublicKeys val)
Holder public keysvoid
set_holder_selected_contest_delay(short val)
The contest delay selected by the holder, which applies to counterparty-broadcast transactionsvoid
set_is_outbound_from_holder(boolean val)
Whether the holder is the initiator of this channel.void
set_opt_anchors(COption_NoneZ val)
Are anchors (zero fee HTLC transaction variant) used for this channel.void
set_opt_non_zero_fee_anchors(COption_NoneZ val)
Are non-zero-fee anchors are enabled (used in conjuction with opt_anchors) It is intended merely for backwards compatibility with signers that need it.byte[]
write()
Serialize the ChannelTransactionParameters object into a byte array which can be read by ChannelTransactionParameters_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_holder_pubkeys
public ChannelPublicKeys get_holder_pubkeys()
Holder public keys
-
set_holder_pubkeys
public void set_holder_pubkeys(ChannelPublicKeys val)
Holder public keys
-
get_holder_selected_contest_delay
public short get_holder_selected_contest_delay()
The contest delay selected by the holder, which applies to counterparty-broadcast transactions
-
set_holder_selected_contest_delay
public void set_holder_selected_contest_delay(short val)
The contest delay selected by the holder, which applies to counterparty-broadcast transactions
-
get_is_outbound_from_holder
public boolean get_is_outbound_from_holder()
Whether the holder is the initiator of this channel. This is an input to the commitment number obscure factor computation.
-
set_is_outbound_from_holder
public void set_is_outbound_from_holder(boolean val)
Whether the holder is the initiator of this channel. This is an input to the commitment number obscure factor computation.
-
get_counterparty_parameters
@Nullable public CounterpartyChannelTransactionParameters get_counterparty_parameters()
The late-bound counterparty channel transaction parameters. These parameters are populated at the point in the protocol where the counterparty provides them. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
set_counterparty_parameters
public void set_counterparty_parameters(@Nullable CounterpartyChannelTransactionParameters val)
The late-bound counterparty channel transaction parameters. These parameters are populated at the point in the protocol where the counterparty provides them. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-
get_funding_outpoint
@Nullable public OutPoint get_funding_outpoint()
The late-bound funding outpoint Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
set_funding_outpoint
public void set_funding_outpoint(@Nullable OutPoint val)
The late-bound funding outpoint Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-
get_opt_anchors
public COption_NoneZ get_opt_anchors()
Are anchors (zero fee HTLC transaction variant) used for this channel. Boolean is serialization backwards-compatible.
-
set_opt_anchors
public void set_opt_anchors(COption_NoneZ val)
Are anchors (zero fee HTLC transaction variant) used for this channel. Boolean is serialization backwards-compatible.
-
get_opt_non_zero_fee_anchors
public COption_NoneZ get_opt_non_zero_fee_anchors()
Are non-zero-fee anchors are enabled (used in conjuction with opt_anchors) It is intended merely for backwards compatibility with signers that need it. There is no support for this feature in LDK channel negotiation.
-
set_opt_non_zero_fee_anchors
public void set_opt_non_zero_fee_anchors(COption_NoneZ val)
Are non-zero-fee anchors are enabled (used in conjuction with opt_anchors) It is intended merely for backwards compatibility with signers that need it. There is no support for this feature in LDK channel negotiation.
-
of
public static ChannelTransactionParameters of(ChannelPublicKeys holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, CounterpartyChannelTransactionParameters counterparty_parameters_arg, OutPoint funding_outpoint_arg, COption_NoneZ opt_anchors_arg, COption_NoneZ opt_non_zero_fee_anchors_arg)
Constructs a new ChannelTransactionParameters given each field
-
clone
public ChannelTransactionParameters clone()
Creates a copy of the ChannelTransactionParameters
-
eq
public boolean eq(ChannelTransactionParameters b)
Checks if two ChannelTransactionParameterss 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.
-
is_populated
public boolean is_populated()
Whether the late bound parameters are populated.
-
as_holder_broadcastable
public DirectedChannelTransactionParameters as_holder_broadcastable()
Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters, given that the holder is the broadcaster. self.is_populated() must be true before calling this function.
-
as_counterparty_broadcastable
public DirectedChannelTransactionParameters as_counterparty_broadcastable()
Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters, given that the counterparty is the broadcaster. self.is_populated() must be true before calling this function.
-
write
public byte[] write()
Serialize the ChannelTransactionParameters object into a byte array which can be read by ChannelTransactionParameters_read
-
read
public static Result_ChannelTransactionParametersDecodeErrorZ read(byte[] ser)
Read a ChannelTransactionParameters from a byte array, created by ChannelTransactionParameters_write
-
-