+ /**
+ * Sign an invoice.
+ * By parameterizing by the raw invoice bytes 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.
+ * The hrp is ascii bytes, while the invoice data is base32.
+ *
+ * The secret key used to sign the invoice is dependent on the [`Recipient`].
+ */
+ public Result_RecoverableSignatureNoneZ sign_invoice(byte[] hrp_bytes, UInt5[] invoice_data, org.ldk.enums.Recipient receipient) {
+ long ret = bindings.KeysInterface_sign_invoice(this.ptr, hrp_bytes, invoice_data != null ? InternalUtils.convUInt5Array(invoice_data) : null, receipient);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(hrp_bytes);
+ Reference.reachabilityFence(invoice_data);
+ Reference.reachabilityFence(receipient);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Get secret key material as bytes for use in encrypting and decrypting inbound payment data.
+ *
+ * If the implementor of this trait supports [phantom node payments], then every node that is
+ * intended to be included in the phantom invoice route hints must return the same value from
+ * this method.
+ *
+ * This method must return the same value each time it is called.
+ *
+ * [phantom node payments]: PhantomKeysManager
+ */
+ public byte[] get_inbound_payment_key_material() {
+ byte[] ret = bindings.KeysInterface_get_inbound_payment_key_material(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+