+ /**
+ * Validate the counterparty's signatures on the holder commitment transaction and HTLCs.
+ *
+ * This is required in order for the signer to make sure that releasing a commitment
+ * secret won't leave us without a broadcastable holder transaction.
+ * Policy checks should be implemented in this function, including checking the amount
+ * sent to us and checking the HTLCs.
+ */
+ public Result_NoneNoneZ validate_holder_commitment(HolderCommitmentTransaction holder_tx) {
+ long ret = bindings.BaseSign_validate_holder_commitment(this.ptr, holder_tx == null ? 0 : holder_tx.ptr & ~1);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
+ this.ptrs_to.add(holder_tx);
+ return ret_hu_conv;
+ }
+