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 ClosingTransaction
clone()
Creates a copy of the ClosingTransactionboolean
eq(ClosingTransaction b)
Checks if two ClosingTransactions contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
long
hash()
Generates a non-cryptographic 64-bit hash of the ClosingTransaction.int
hashCode()
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 classbyte[]
to_counterparty_script()
The destination of the counterparty's outputlong
to_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 outputlong
to_holder_value_sat()
The value to be sent to the holder, or zero if the output will be omittedTrustedClosingTransaction
trust()
Trust our pre-built transaction.Result_TrustedClosingTransactionNoneZ
verify(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()
Generates a non-cryptographic 64-bit hash of the ClosingTransaction.
-
eq
public boolean eq(ClosingTransaction b)
Checks if two ClosingTransactions 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.
-
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
-
-