+ /**
+ * 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;
+ }
+