* 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); };
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
*/