- public ClosingSigned(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg) {
- super(bindings.ClosingSigned_new(channel_id_arg, fee_satoshis_arg, signature_arg));
+ /**
+ * Constructs a new ClosingSigned given each field
+ */
+ public static ClosingSigned of(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, ClosingSignedFeeRange fee_range_arg) {
+ long ret = bindings.ClosingSigned_new(channel_id_arg, fee_satoshis_arg, signature_arg, fee_range_arg == null ? 0 : fee_range_arg.ptr & ~1);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSigned(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a copy of the ClosingSigned
+ */
+ public ClosingSigned clone() {
+ long ret = bindings.ClosingSigned_clone(this.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ClosingSigned ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ClosingSigned(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the ClosingSigned object into a byte array which can be read by ClosingSigned_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.ClosingSigned_write(this.ptr);
+ return ret;