+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Reads a `Signer` for this `KeysInterface` from the given input stream.
+ * This is only called during deserialization of other objects which contain
+ * `Sign`-implementing objects (ie `ChannelMonitor`s and `ChannelManager`s).
+ * The bytes are exactly those which `<Self::Signer as Writeable>::write()` writes, and
+ * contain no versioning scheme. You may wish to include your own version prefix and ensure
+ * you've read all of the provided bytes to ensure no corruption occurred.
+ */
+ public Result_SignDecodeErrorZ read_chan_signer(byte[] reader) {
+ long ret = bindings.KeysInterface_read_chan_signer(this.ptr, reader);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(reader);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
+ 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);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(invoice_preimage);
+ 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.
+ *
+ * This method must return the same value each time it is called.
+ */
+ public byte[] get_inbound_payment_key_material() {
+ byte[] ret = bindings.KeysInterface_get_inbound_payment_key_material(this.ptr);
+ Reference.reachabilityFence(this);