[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / DelayedPaymentBasepoint.java
index 9170bb892e7848f7257bb93f6e91c32a66886114..a454f7e57ca32264190e12e0d4110d83eebd169a 100644 (file)
@@ -54,7 +54,7 @@ public class DelayedPaymentBasepoint extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(org.ldk.structs.DelayedPaymentBasepoint b) {
-               boolean ret = bindings.DelayedPaymentBasepoint_eq(this.ptr, b == null ? 0 : b.ptr);
+               boolean ret = bindings.DelayedPaymentBasepoint_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 DelayedPaymentBasepoint extends CommonBase {
                return ret;
        }
 
+       /**
+        * Derives the \"tweak\" used in calculate [`DelayedPaymentKey::from_basepoint`].\n\n[`DelayedPaymentKey::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.DelayedPaymentBasepoint_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 DelayedPaymentBasepoint object into a byte array which can be read by DelayedPaymentBasepoint_read
         */