- public void set_channel_id(Shutdown this_ptr, byte[] val) {
- bindings.Shutdown_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
- this.ptrs_to.add(this_ptr);
+ /**
+ * The destination of this peer's funds on closing.
+ * Must be in one of these forms: p2pkh, p2sh, p2wpkh, p2wsh.
+ */
+ public void set_scriptpubkey(byte[] val) {
+ bindings.Shutdown_set_scriptpubkey(this.ptr, val);
+ }
+
+ /**
+ * Constructs a new Shutdown given each field
+ */
+ public static Shutdown of(byte[] channel_id_arg, byte[] scriptpubkey_arg) {
+ long ret = bindings.Shutdown_new(channel_id_arg, 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;
+ }
+
+ /**
+ * 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);
+ return ret_hu_conv;