* chosen to forgo their output as dust.
*/
Result_SignatureNoneZ sign_closing_transaction(ClosingTransaction closing_tx);
+ /**
+ * Computes the signature for a commitment transaction's anchor output used as an
+ * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+ */
+ Result_SignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input);
/**
* Signs a channel announcement message with our funding key and our node secret key (aka
* node_id or network_key), proving it comes from one of the channel participants.
long result = ret == null ? 0 : ret.clone_ptr();
return result;
}
+ @Override public long sign_holder_anchor_input(byte[] anchor_tx, long input) {
+ Result_SignatureNoneZ ret = arg.sign_holder_anchor_input(anchor_tx, input);
+ Reference.reachabilityFence(arg);
+ long result = ret == null ? 0 : ret.clone_ptr();
+ return result;
+ }
@Override public long sign_channel_announcement(long msg) {
org.ldk.structs.UnsignedChannelAnnouncement msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.UnsignedChannelAnnouncement(null, msg); }
Result_C2Tuple_SignatureSignatureZNoneZ ret = arg.sign_channel_announcement(msg_hu_conv);
Reference.reachabilityFence(preimages);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
- this.ptrs_to.add(holder_tx);
+ if (this != null) { this.ptrs_to.add(holder_tx); };
return ret_hu_conv;
}
Reference.reachabilityFence(preimages);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
- this.ptrs_to.add(commitment_tx);
+ if (this != null) { this.ptrs_to.add(commitment_tx); };
return ret_hu_conv;
}
Reference.reachabilityFence(commitment_tx);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
- this.ptrs_to.add(commitment_tx);
+ if (this != null) { this.ptrs_to.add(commitment_tx); };
return ret_hu_conv;
}
Reference.reachabilityFence(htlc);
if (ret >= 0 && ret <= 4096) { return null; }
Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
- this.ptrs_to.add(htlc);
+ if (this != null) { this.ptrs_to.add(htlc); };
return ret_hu_conv;
}
Reference.reachabilityFence(htlc);
if (ret >= 0 && ret <= 4096) { return null; }
Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
- this.ptrs_to.add(htlc);
+ if (this != null) { this.ptrs_to.add(htlc); };
return ret_hu_conv;
}
Reference.reachabilityFence(closing_tx);
if (ret >= 0 && ret <= 4096) { return null; }
Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
- this.ptrs_to.add(closing_tx);
+ if (this != null) { this.ptrs_to.add(closing_tx); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Computes the signature for a commitment transaction's anchor output used as an
+ * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+ */
+ public Result_SignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input) {
+ long ret = bindings.BaseSign_sign_holder_anchor_input(this.ptr, anchor_tx, input);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(anchor_tx);
+ Reference.reachabilityFence(input);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
return ret_hu_conv;
}
Reference.reachabilityFence(msg);
if (ret >= 0 && ret <= 4096) { return null; }
Result_C2Tuple_SignatureSignatureZNoneZ ret_hu_conv = Result_C2Tuple_SignatureSignatureZNoneZ.constr_from_ptr(ret);
- this.ptrs_to.add(msg);
+ if (this != null) { this.ptrs_to.add(msg); };
return ret_hu_conv;
}
bindings.BaseSign_ready_channel(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(channel_parameters);
- this.ptrs_to.add(channel_parameters);
+ if (this != null) { this.ptrs_to.add(channel_parameters); };
}
/**
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ChannelPublicKeys ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelPublicKeys(null, ret); }
- ret_hu_conv.ptrs_to.add(this);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
return ret_hu_conv;
}