Update java bindings with new generator and new upstream code
[ldk-java] / src / main / java / org / ldk / structs / TrustedCommitmentTransaction.java
index 9d7c132000d0c4637dac3f3a38b4eb83da80331e..87d691ce4b0105338c279223b934efc993dc52c5 100644 (file)
@@ -5,6 +5,15 @@ import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
 
+
+/**
+ * A wrapper on CommitmentTransaction indicating that the derived fields (the built bitcoin
+ * transaction and the transaction creation keys) are trusted.
+ * 
+ * See trust() and verify() functions on CommitmentTransaction.
+ * 
+ * This structure implements Deref.
+ */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class TrustedCommitmentTransaction extends CommonBase {
        TrustedCommitmentTransaction(Object _dummy, long ptr) { super(ptr); }
@@ -14,11 +23,17 @@ public class TrustedCommitmentTransaction extends CommonBase {
                if (ptr != 0) { bindings.TrustedCommitmentTransaction_free(ptr); }
        }
 
+       /**
+        * The transaction ID of the built Bitcoin transaction
+        */
        public byte[] txid() {
                byte[] ret = bindings.TrustedCommitmentTransaction_txid(this.ptr);
                return ret;
        }
 
+       /**
+        * The pre-built Bitcoin commitment transaction
+        */
        public BuiltCommitmentTransaction built_transaction() {
                long ret = bindings.TrustedCommitmentTransaction_built_transaction(this.ptr);
                BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret);
@@ -26,6 +41,9 @@ public class TrustedCommitmentTransaction extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * The pre-calculated transaction creation public keys.
+        */
        public TxCreationKeys keys() {
                long ret = bindings.TrustedCommitmentTransaction_keys(this.ptr);
                TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
@@ -33,6 +51,12 @@ public class TrustedCommitmentTransaction extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Get a signature for each HTLC which was included in the commitment transaction (ie for
+        * which HTLCOutputInCommitment::transaction_output_index.is_some()).
+        * 
+        * The returned Vec has one entry for each HTLC, and in the same order.
+        */
        public Result_CVec_SignatureZNoneZ get_htlc_sigs(byte[] htlc_base_key, DirectedChannelTransactionParameters channel_parameters) {
                long ret = bindings.TrustedCommitmentTransaction_get_htlc_sigs(this.ptr, htlc_base_key, channel_parameters == null ? 0 : channel_parameters.ptr & ~1);
                Result_CVec_SignatureZNoneZ ret_hu_conv = Result_CVec_SignatureZNoneZ.constr_from_ptr(ret);