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