Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / KeysInterface.java
index bbb5df9856e0c9f78ed67f9362e9d266f80bc8b1..743c7544fdfa1728789be6c82e75bcaab6d38c6b 100644 (file)
@@ -68,6 +68,13 @@ public class KeysInterface extends CommonBase {
                 * you've read all of the provided bytes to ensure no corruption occurred.
                 */
                Result_SignDecodeErrorZ read_chan_signer(byte[] reader);
+               /**
+                * Sign an invoice's preimage (note that this is the preimage of the invoice, not the HTLC's
+                * preimage). By parameterizing by the preimage instead of the hash, we allow implementors of
+                * this trait to parse the invoice and make sure they're signing what they expect, rather than
+                * blindly signing the hash.
+                */
+               Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage);
        }
        private static class LDKKeysInterfaceHolder { KeysInterface held; }
        public static KeysInterface new_impl(KeysInterfaceInterface arg) {
@@ -100,6 +107,11 @@ public class KeysInterface extends CommonBase {
                                long result = ret != null ? ret.ptr : 0;
                                return result;
                        }
+                       @Override public long sign_invoice(byte[] invoice_preimage) {
+                               Result_RecoverableSignatureNoneZ ret = arg.sign_invoice(invoice_preimage);
+                               long result = ret != null ? ret.ptr : 0;
+                               return result;
+                       }
                });
                return impl_holder.held;
        }
@@ -175,4 +187,16 @@ public class KeysInterface extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Sign an invoice's preimage (note that this is the preimage of the invoice, not the HTLC's
+        * preimage). By parameterizing by the preimage instead of the hash, we allow implementors of
+        * this trait to parse the invoice and make sure they're signing what they expect, rather than
+        * blindly signing the hash.
+        */
+       public Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage) {
+               long ret = bindings.KeysInterface_sign_invoice(this.ptr, invoice_preimage);
+               Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }