[Java] Update auto-generated Java bindings for 0.0.116
[ldk-java] / src / main / java / org / ldk / structs / EcdsaChannelSigner.java
index a19e255c36f284a1055521fa0deeac3427eb67a0..a5bcc447b8b3bf8e7d630f0cb4059cdec596a092 100644 (file)
@@ -123,6 +123,16 @@ public class EcdsaChannelSigner extends CommonBase {
                 * (which is committed to in the BIP 143 signatures).
                 */
                Result_SignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc);
+               /**
+                * Computes the signature for a commitment transaction's HTLC output used as an input within
+                * `htlc_tx`, which spends the commitment transaction at index `input`. The signature returned
+                * must be be computed using [`EcdsaSighashType::All`]. Note that this should only be used to
+                * sign HTLC transactions from channels supporting anchor outputs after all additional
+                * inputs/outputs have been added to the transaction.
+                * 
+                * [`EcdsaSighashType::All`]: bitcoin::blockdata::transaction::EcdsaSighashType::All
+                */
+               Result_SignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, HTLCDescriptor htlc_descriptor);
                /**
                 * Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment
                 * transaction, either offered or received.
@@ -205,6 +215,13 @@ public class EcdsaChannelSigner extends CommonBase {
                                long result = ret == null ? 0 : ret.clone_ptr();
                                return result;
                        }
+                       @Override public long sign_holder_htlc_transaction(byte[] htlc_tx, long input, long htlc_descriptor) {
+                               org.ldk.structs.HTLCDescriptor htlc_descriptor_hu_conv = null; if (htlc_descriptor < 0 || htlc_descriptor > 4096) { htlc_descriptor_hu_conv = new org.ldk.structs.HTLCDescriptor(null, htlc_descriptor); }
+                               Result_SignatureNoneZ ret = arg.sign_holder_htlc_transaction(htlc_tx, input, htlc_descriptor_hu_conv);
+                               Reference.reachabilityFence(arg);
+                               long result = ret == null ? 0 : ret.clone_ptr();
+                               return result;
+                       }
                        @Override public long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc) {
                                org.ldk.structs.HTLCOutputInCommitment htlc_hu_conv = null; if (htlc < 0 || htlc > 4096) { htlc_hu_conv = new org.ldk.structs.HTLCOutputInCommitment(null, htlc); }
                                Result_SignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv);
@@ -376,6 +393,27 @@ public class EcdsaChannelSigner extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Computes the signature for a commitment transaction's HTLC output used as an input within
+        * `htlc_tx`, which spends the commitment transaction at index `input`. The signature returned
+        * must be be computed using [`EcdsaSighashType::All`]. Note that this should only be used to
+        * sign HTLC transactions from channels supporting anchor outputs after all additional
+        * inputs/outputs have been added to the transaction.
+        * 
+        * [`EcdsaSighashType::All`]: bitcoin::blockdata::transaction::EcdsaSighashType::All
+        */
+       public Result_SignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, org.ldk.structs.HTLCDescriptor htlc_descriptor) {
+               long ret = bindings.EcdsaChannelSigner_sign_holder_htlc_transaction(this.ptr, htlc_tx, input, htlc_descriptor == null ? 0 : htlc_descriptor.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(htlc_tx);
+               Reference.reachabilityFence(input);
+               Reference.reachabilityFence(htlc_descriptor);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               if (this != null) { this.ptrs_to.add(htlc_descriptor); };
+               return ret_hu_conv;
+       }
+
        /**
         * Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment
         * transaction, either offered or received.