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::events::Event::SpendableOutputs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SpendableOutputDescriptor.DelayedPaymentOutput
An output to a P2WSH script which can be spent with a single signature after an `OP_CSV` delay.static class
SpendableOutputDescriptor.StaticOutput
An output to a script which was provided via [`SignerProvider`] directly, either from [`get_destination_script`] or [`get_shutdown_scriptpubkey`], thus you should already know how to spend it.static class
SpendableOutputDescriptor.StaticPaymentOutput
An output to a P2WPKH, spendable exclusively by our payment key (i.e., the private key which corresponds to the `payment_point` in [`ChannelSigner::pubkeys`]).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SpendableOutputDescriptor
clone()
Creates a copy of the SpendableOutputDescriptorstatic SpendableOutputDescriptor
delayed_payment_output(DelayedPaymentOutputDescriptor a)
Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptorboolean
eq(SpendableOutputDescriptor b)
Checks if two SpendableOutputDescriptors contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
static Result_SpendableOutputDescriptorDecodeErrorZ
read(byte[] ser)
Read a SpendableOutputDescriptor from a byte array, created by SpendableOutputDescriptor_writestatic SpendableOutputDescriptor
static_output(OutPoint outpoint, TxOut output)
Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptorstatic SpendableOutputDescriptor
static_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
-
-