Package org.ldk.structs
Class ClosingTransaction
- java.lang.Object
-
- org.ldk.structs.ClosingTransaction
-
public class ClosingTransaction extends Object
This class tracks the per-transaction information needed to build a closing transaction and will actually build it and sign. This class can be used inside a signer implementation to generate a signature given the relevant secret key.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClosingTransactionclone()Creates a copy of the ClosingTransactionprotected voidfinalize()longhash()Checks if two ClosingTransactions contain equal inner contents.inthashCode()static ClosingTransactionof(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, OutPoint funding_outpoint)Construct an object of the classbyte[]to_counterparty_script()The destination of the counterparty's outputlongto_counterparty_value_sat()The value to be sent to the counterparty, or zero if the output will be omittedbyte[]to_holder_script()The destination of the holder's outputlongto_holder_value_sat()The value to be sent to the holder, or zero if the output will be omittedTrustedClosingTransactiontrust()Trust our pre-built transaction.Result_TrustedClosingTransactionNoneZverify(OutPoint funding_outpoint)Verify our pre-built transaction.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public ClosingTransaction clone()
Creates a copy of the ClosingTransaction
-
hash
public long hash()
Checks if two ClosingTransactions contain equal inner contents.
-
of
public static ClosingTransaction of(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, OutPoint funding_outpoint)
Construct an object of the class
-
trust
public TrustedClosingTransaction trust()
Trust our pre-built transaction. Applies a wrapper which allows access to the transaction. This should only be used if you fully trust the builder of this object. It should not be used by an external signer - instead use the verify function.
-
verify
public Result_TrustedClosingTransactionNoneZ verify(OutPoint funding_outpoint)
Verify our pre-built transaction. Applies a wrapper which allows access to the transaction. An external validating signer must call this method before signing or using the built transaction.
-
to_holder_value_sat
public long to_holder_value_sat()
The value to be sent to the holder, or zero if the output will be omitted
-
to_counterparty_value_sat
public long to_counterparty_value_sat()
The value to be sent to the counterparty, or zero if the output will be omitted
-
to_holder_script
public byte[] to_holder_script()
The destination of the holder's output
-
to_counterparty_script
public byte[] to_counterparty_script()
The destination of the counterparty's output
-
-