- public static Shutdown constructor_new(byte[] channel_id_arg, byte[] scriptpubkey_arg) {
- long ret = bindings.Shutdown_new(channel_id_arg, scriptpubkey_arg);
- Shutdown ret_hu_conv = new Shutdown(null, ret);
+ /**
+ * Constructs a new Shutdown given each field
+ */
+ public static Shutdown of(byte[] channel_id_arg, byte[] scriptpubkey_arg) {
+ long ret = bindings.Shutdown_new(InternalUtils.check_arr_len(channel_id_arg, 32), scriptpubkey_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Shutdown ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new Shutdown(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.Shutdown_clone_ptr(this.ptr);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the Shutdown
+ */
+ public Shutdown clone() {
+ long ret = bindings.Shutdown_clone(this.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Shutdown ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new Shutdown(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);