Package org.ldk.structs
Class SpendableOutputDescriptor
- java.lang.Object
-
- org.ldk.structs.SpendableOutputDescriptor
-
- Direct Known Subclasses:
SpendableOutputDescriptor.DelayedPaymentOutput,SpendableOutputDescriptor.StaticOutput,SpendableOutputDescriptor.StaticPaymentOutput
public class SpendableOutputDescriptor extends Object
Describes the necessary information to spend a spendable output. When on-chain outputs are created by LDK (which our counterparty is not able to claim at any point in the future) a [`SpendableOutputs`] event is generated which you must track and be able to spend on-chain. The information needed to do this is provided in this enum, including the outpoint describing which `txid` and output `index` is available, the full output which exists at that `txid`/`index`, and any keys or other information required to sign. [`SpendableOutputs`]: crate::util::events::Event::SpendableOutputs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpendableOutputDescriptor.DelayedPaymentOutputAn output to a P2WSH script which can be spent with a single signature after an `OP_CSV` delay.static classSpendableOutputDescriptor.StaticOutputAn output to a script which was provided via [`KeysInterface`] directly, either from [`get_destination_script`] or [`get_shutdown_scriptpubkey`], thus you should already know how to spend it.static classSpendableOutputDescriptor.StaticPaymentOutputAn output to a P2WPKH, spendable exclusively by our payment key (i.e., the private key which corresponds to the `payment_point` in [`BaseSign::pubkeys`]).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SpendableOutputDescriptorclone()Creates a copy of the SpendableOutputDescriptorstatic SpendableOutputDescriptordelayed_payment_output(DelayedPaymentOutputDescriptor a)Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptorbooleaneq(SpendableOutputDescriptor b)Checks if two SpendableOutputDescriptors contain equal inner contents.booleanequals(Object o)protected voidfinalize()static Result_SpendableOutputDescriptorDecodeErrorZread(byte[] ser)Read a SpendableOutputDescriptor from a byte array, created by SpendableOutputDescriptor_writestatic SpendableOutputDescriptorstatic_output(OutPoint outpoint, TxOut output)Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptorstatic SpendableOutputDescriptorstatic_payment_output(StaticPaymentOutputDescriptor a)Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptorbyte[]write()Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public SpendableOutputDescriptor clone()
Creates a copy of the SpendableOutputDescriptor
-
static_output
public static SpendableOutputDescriptor static_output(OutPoint outpoint, TxOut output)
Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor
-
delayed_payment_output
public static SpendableOutputDescriptor delayed_payment_output(DelayedPaymentOutputDescriptor a)
Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptor
-
static_payment_output
public static SpendableOutputDescriptor static_payment_output(StaticPaymentOutputDescriptor a)
Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptor
-
eq
public boolean eq(SpendableOutputDescriptor b)
Checks if two SpendableOutputDescriptors contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
-
write
public byte[] write()
Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
-
read
public static Result_SpendableOutputDescriptorDecodeErrorZ read(byte[] ser)
Read a SpendableOutputDescriptor from a byte array, created by SpendableOutputDescriptor_write
-
-