[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / HtlcBasepoint.java
index 2240ccedf903c04aa15427ce5b77a33c260837f9..308f089e836badd2c328522395b5a54fcde8eaae 100644 (file)
@@ -54,7 +54,7 @@ public class HtlcBasepoint extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.HtlcBasepoint b) {
-               boolean ret = bindings.HtlcBasepoint_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.HtlcBasepoint_eq(this.ptr, b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
                if (this != null) { this.ptrs_to.add(b); };
@@ -104,6 +104,16 @@ public class HtlcBasepoint extends CommonBase {
                return ret;
        }
 
+       /**
+        * Derives the \"tweak\" used in calculate [`HtlcKey::from_basepoint`].\n\n[`HtlcKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party.
+        */
+       public byte[] derive_add_tweak(byte[] per_commitment_point) {
+               byte[] ret = bindings.HtlcBasepoint_derive_add_tweak(this.ptr, InternalUtils.check_arr_len(per_commitment_point, 33));
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(per_commitment_point);
+               return ret;
+       }
+
        /**
         * Serialize the HtlcBasepoint object into a byte array which can be read by HtlcBasepoint_read
         */