+ Reference.reachabilityFence(recipient);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_SecretKeyNoneZ ret_hu_conv = Result_SecretKeyNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
+ * one is provided. Note that this tweak can be applied to `other_key` instead of our node
+ * secret, though this is less efficient.
+ *
+ * [`node secret`]: Self::get_node_secret
+ */
+ public Result_SharedSecretNoneZ ecdh(org.ldk.enums.Recipient recipient, byte[] other_key, Option_ScalarZ tweak) {
+ long ret = bindings.KeysInterface_ecdh(this.ptr, recipient, InternalUtils.check_arr_len(other_key, 33), tweak.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(recipient);
+ Reference.reachabilityFence(other_key);
+ Reference.reachabilityFence(tweak);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_SharedSecretNoneZ ret_hu_conv = Result_SharedSecretNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;