6 namespace org { namespace ldk { namespace structs {
10 * A tx_remove_input message for removing an input during interactive transaction construction.
12 public class TxRemoveInput : CommonBase {
13 internal TxRemoveInput(object _dummy, long ptr) : base(ptr) { }
15 if (ptr != 0) { bindings.TxRemoveInput_free(ptr); }
21 public byte[] get_channel_id() {
22 long ret = bindings.TxRemoveInput_get_channel_id(this.ptr);
24 if (ret >= 0 && ret <= 4096) { return null; }
25 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
32 public void set_channel_id(byte[] val) {
33 bindings.TxRemoveInput_set_channel_id(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
39 * The serial ID of the input to be removed
41 public long get_serial_id() {
42 long ret = bindings.TxRemoveInput_get_serial_id(this.ptr);
48 * The serial ID of the input to be removed
50 public void set_serial_id(long val) {
51 bindings.TxRemoveInput_set_serial_id(this.ptr, val);
57 * Constructs a new TxRemoveInput given each field
59 public static TxRemoveInput of(byte[] channel_id_arg, long serial_id_arg) {
60 long ret = bindings.TxRemoveInput_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_id_arg, 32)), serial_id_arg);
61 GC.KeepAlive(channel_id_arg);
62 GC.KeepAlive(serial_id_arg);
63 if (ret >= 0 && ret <= 4096) { return null; }
64 org.ldk.structs.TxRemoveInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveInput(null, ret); }
65 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
69 internal long clone_ptr() {
70 long ret = bindings.TxRemoveInput_clone_ptr(this.ptr);
76 * Creates a copy of the TxRemoveInput
78 public TxRemoveInput clone() {
79 long ret = bindings.TxRemoveInput_clone(this.ptr);
81 if (ret >= 0 && ret <= 4096) { return null; }
82 org.ldk.structs.TxRemoveInput ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxRemoveInput(null, ret); }
83 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
88 * Generates a non-cryptographic 64-bit hash of the TxRemoveInput.
91 long ret = bindings.TxRemoveInput_hash(this.ptr);
96 public override int GetHashCode() {
97 return (int)this.hash();
100 * Checks if two TxRemoveInputs contain equal inner contents.
101 * This ignores pointers and is_owned flags and looks at the values in fields.
102 * Two objects with NULL inner values will be considered "equal" here.
104 public bool eq(org.ldk.structs.TxRemoveInput b) {
105 bool ret = bindings.TxRemoveInput_eq(this.ptr, b == null ? 0 : b.ptr);
108 if (this != null) { this.ptrs_to.AddLast(b); };
112 public override bool Equals(object o) {
113 if (!(o is TxRemoveInput)) return false;
114 return this.eq((TxRemoveInput)o);
117 * Serialize the TxRemoveInput object into a byte array which can be read by TxRemoveInput_read
119 public byte[] write() {
120 long ret = bindings.TxRemoveInput_write(this.ptr);
122 if (ret >= 0 && ret <= 4096) { return null; }
123 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
128 * Read a TxRemoveInput from a byte array, created by TxRemoveInput_write
130 public static Result_TxRemoveInputDecodeErrorZ read(byte[] ser) {
131 long ret = bindings.TxRemoveInput_read(InternalUtils.encodeUint8Array(ser));
133 if (ret >= 0 && ret <= 4096) { return null; }
134 Result_TxRemoveInputDecodeErrorZ ret_hu_conv = Result_TxRemoveInputDecodeErrorZ.constr_from_ptr(ret);