Package org.ldk.structs
Class BuiltCommitmentTransaction
- java.lang.Object
-
- org.ldk.structs.BuiltCommitmentTransaction
-
public class BuiltCommitmentTransaction extends Object
A pre-built Bitcoin commitment transaction and its txid.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BuiltCommitmentTransaction
clone()
Creates a copy of the BuiltCommitmentTransactionprotected void
finalize()
byte[]
get_sighash_all(byte[] funding_redeemscript, long channel_value_satoshis)
Get the SIGHASH_ALL sighash value of the transaction.byte[]
get_transaction()
The commitment transactionbyte[]
get_txid()
The txid for the commitment transaction.static BuiltCommitmentTransaction
of(byte[] transaction_arg, byte[] txid_arg)
Constructs a new BuiltCommitmentTransaction given each fieldstatic Result_BuiltCommitmentTransactionDecodeErrorZ
read(byte[] ser)
Read a BuiltCommitmentTransaction from a byte array, created by BuiltCommitmentTransaction_writevoid
set_transaction(byte[] val)
The commitment transactionvoid
set_txid(byte[] val)
The txid for the commitment transaction.byte[]
sign(byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis)
Sign a transaction, either because we are counter-signing the counterparty's transaction or because we are about to broadcast a holder transaction.byte[]
write()
Serialize the BuiltCommitmentTransaction object into a byte array which can be read by BuiltCommitmentTransaction_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_transaction
public byte[] get_transaction()
The commitment transaction
-
set_transaction
public void set_transaction(byte[] val)
The commitment transaction
-
get_txid
public byte[] get_txid()
The txid for the commitment transaction. This is provided as a performance optimization, instead of calling transaction.txid() multiple times.
-
set_txid
public void set_txid(byte[] val)
The txid for the commitment transaction. This is provided as a performance optimization, instead of calling transaction.txid() multiple times.
-
of
public static BuiltCommitmentTransaction of(byte[] transaction_arg, byte[] txid_arg)
Constructs a new BuiltCommitmentTransaction given each field
-
clone
public BuiltCommitmentTransaction clone()
Creates a copy of the BuiltCommitmentTransaction
-
write
public byte[] write()
Serialize the BuiltCommitmentTransaction object into a byte array which can be read by BuiltCommitmentTransaction_read
-
read
public static Result_BuiltCommitmentTransactionDecodeErrorZ read(byte[] ser)
Read a BuiltCommitmentTransaction from a byte array, created by BuiltCommitmentTransaction_write
-
get_sighash_all
public byte[] get_sighash_all(byte[] funding_redeemscript, long channel_value_satoshis)
Get the SIGHASH_ALL sighash value of the transaction. This can be used to verify a signature.
-
sign
public byte[] sign(byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis)
Sign a transaction, either because we are counter-signing the counterparty's transaction or because we are about to broadcast a holder transaction.
-
-