Class 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
    • Method Detail

      • static_output

        public static SpendableOutputDescriptor static_output​(OutPoint outpoint,
                                                              TxOut output)
        Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor
      • hash

        public long hash()
        Generates a non-cryptographic 64-bit hash of the SpendableOutputDescriptor.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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