Package org.ldk.structs
Class StaticPaymentOutputDescriptor
- java.lang.Object
-
- org.ldk.structs.StaticPaymentOutputDescriptor
-
public class StaticPaymentOutputDescriptor extends Object
Information about a spendable output to our \"payment key\". See [`SpendableOutputDescriptor::StaticPaymentOutput`] for more details on how to spend this.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StaticPaymentOutputDescriptorclone()Creates a copy of the StaticPaymentOutputDescriptorbooleaneq(StaticPaymentOutputDescriptor b)Checks if two StaticPaymentOutputDescriptors contain equal inner contents.booleanequals(Object o)protected voidfinalize()byte[]get_channel_keys_id()Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].ChannelTransactionParametersget_channel_transaction_parameters()The necessary channel parameters that need to be provided to the re-derived signer through [`ChannelSigner::provide_channel_parameters`].longget_channel_value_satoshis()The value of the channel which this transactions spends.OutPointget_outpoint()The outpoint which is spendable.TxOutget_output()The output which is referenced by the given outpoint.longhash()Generates a non-cryptographic 64-bit hash of the StaticPaymentOutputDescriptor.inthashCode()longmax_witness_length()The maximum length a well-formed witness spending one of these should have.static StaticPaymentOutputDescriptorof(OutPoint outpoint_arg, TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, ChannelTransactionParameters channel_transaction_parameters_arg)Constructs a new StaticPaymentOutputDescriptor given each field Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent Nonestatic Result_StaticPaymentOutputDescriptorDecodeErrorZread(byte[] ser)Read a StaticPaymentOutputDescriptor from a byte array, created by StaticPaymentOutputDescriptor_writevoidset_channel_keys_id(byte[] val)Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].voidset_channel_transaction_parameters(ChannelTransactionParameters val)The necessary channel parameters that need to be provided to the re-derived signer through [`ChannelSigner::provide_channel_parameters`].voidset_channel_value_satoshis(long val)The value of the channel which this transactions spends.voidset_outpoint(OutPoint val)The outpoint which is spendable.voidset_output(TxOut val)The output which is referenced by the given outpoint.Option_CVec_u8ZZwitness_script()Returns the `witness_script` of the spendable output.byte[]write()Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_outpoint
public OutPoint get_outpoint()
The outpoint which is spendable.
-
set_outpoint
public void set_outpoint(OutPoint val)
The outpoint which is spendable.
-
get_output
public TxOut get_output()
The output which is referenced by the given outpoint.
-
set_output
public void set_output(TxOut val)
The output which is referenced by the given outpoint.
-
get_channel_keys_id
public byte[] get_channel_keys_id()
Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`]. This may be useful in re-deriving keys used in the channel to spend the output.
-
set_channel_keys_id
public void set_channel_keys_id(byte[] val)
Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`]. This may be useful in re-deriving keys used in the channel to spend the output.
-
get_channel_value_satoshis
public long get_channel_value_satoshis()
The value of the channel which this transactions spends.
-
set_channel_value_satoshis
public void set_channel_value_satoshis(long val)
The value of the channel which this transactions spends.
-
get_channel_transaction_parameters
@Nullable public ChannelTransactionParameters get_channel_transaction_parameters()
The necessary channel parameters that need to be provided to the re-derived signer through [`ChannelSigner::provide_channel_parameters`]. Added as optional, but always `Some` if the descriptor was produced in v0.0.117 or later. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
set_channel_transaction_parameters
public void set_channel_transaction_parameters(@Nullable ChannelTransactionParameters val)
The necessary channel parameters that need to be provided to the re-derived signer through [`ChannelSigner::provide_channel_parameters`]. Added as optional, but always `Some` if the descriptor was produced in v0.0.117 or later. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-
of
public static StaticPaymentOutputDescriptor of(OutPoint outpoint_arg, TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg, @Nullable ChannelTransactionParameters channel_transaction_parameters_arg)
Constructs a new StaticPaymentOutputDescriptor given each field Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
-
clone
public StaticPaymentOutputDescriptor clone()
Creates a copy of the StaticPaymentOutputDescriptor
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the StaticPaymentOutputDescriptor.
-
eq
public boolean eq(StaticPaymentOutputDescriptor b)
Checks if two StaticPaymentOutputDescriptors 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.
-
witness_script
public Option_CVec_u8ZZ witness_script()
Returns the `witness_script` of the spendable output. Note that this will only return `Some` for [`StaticPaymentOutputDescriptor`]s that originated from an anchor outputs channel, as they take the form of a P2WSH script.
-
max_witness_length
public long max_witness_length()
The maximum length a well-formed witness spending one of these should have. Note: If you have the grind_signatures feature enabled, this will be at least 1 byte shorter.
-
write
public byte[] write()
Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read
-
read
public static Result_StaticPaymentOutputDescriptorDecodeErrorZ read(byte[] ser)
Read a StaticPaymentOutputDescriptor from a byte array, created by StaticPaymentOutputDescriptor_write
-
-