6 namespace org { namespace ldk { namespace structs {
10 * An error occurring when converting from [`ScriptBuf`] to [`ShutdownScript`].
12 public class InvalidShutdownScript : CommonBase {
13 internal InvalidShutdownScript(object _dummy, long ptr) : base(ptr) { }
14 ~InvalidShutdownScript() {
15 if (ptr != 0) { bindings.InvalidShutdownScript_free(ptr); }
19 * The script that did not meet the requirements from [BOLT #2].
21 * [BOLT #2]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md
23 public byte[] get_script() {
24 long ret = bindings.InvalidShutdownScript_get_script(this.ptr);
26 if (ret >= 0 && ret <= 4096) { return null; }
27 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
32 * The script that did not meet the requirements from [BOLT #2].
34 * [BOLT #2]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md
36 public void set_script(byte[] val) {
37 bindings.InvalidShutdownScript_set_script(this.ptr, InternalUtils.encodeUint8Array(val));
43 * Constructs a new InvalidShutdownScript given each field
45 public static InvalidShutdownScript of(byte[] script_arg) {
46 long ret = bindings.InvalidShutdownScript_new(InternalUtils.encodeUint8Array(script_arg));
47 GC.KeepAlive(script_arg);
48 if (ret >= 0 && ret <= 4096) { return null; }
49 org.ldk.structs.InvalidShutdownScript ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvalidShutdownScript(null, ret); }
50 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
54 internal long clone_ptr() {
55 long ret = bindings.InvalidShutdownScript_clone_ptr(this.ptr);
61 * Creates a copy of the InvalidShutdownScript
63 public InvalidShutdownScript clone() {
64 long ret = bindings.InvalidShutdownScript_clone(this.ptr);
66 if (ret >= 0 && ret <= 4096) { return null; }
67 org.ldk.structs.InvalidShutdownScript ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvalidShutdownScript(null, ret); }
68 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };