6 namespace org { namespace ldk { namespace structs {
10 * A tx_complete message signalling the conclusion of a peer's transaction contributions during
11 * interactive transaction construction.
13 public class TxComplete : CommonBase {
14 internal TxComplete(object _dummy, long ptr) : base(ptr) { }
16 if (ptr != 0) { bindings.TxComplete_free(ptr); }
22 public byte[] get_channel_id() {
23 byte[] ret = bindings.TxComplete_get_channel_id(this.ptr);
31 public void set_channel_id(byte[] val) {
32 bindings.TxComplete_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
38 * Constructs a new TxComplete given each field
40 public static TxComplete of(byte[] channel_id_arg) {
41 long ret = bindings.TxComplete_new(InternalUtils.check_arr_len(channel_id_arg, 32));
42 GC.KeepAlive(channel_id_arg);
43 if (ret >= 0 && ret <= 4096) { return null; }
44 org.ldk.structs.TxComplete ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxComplete(null, ret); }
45 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
49 internal long clone_ptr() {
50 long ret = bindings.TxComplete_clone_ptr(this.ptr);
56 * Creates a copy of the TxComplete
58 public TxComplete clone() {
59 long ret = bindings.TxComplete_clone(this.ptr);
61 if (ret >= 0 && ret <= 4096) { return null; }
62 org.ldk.structs.TxComplete ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxComplete(null, ret); }
63 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
68 * Checks if two TxCompletes contain equal inner contents.
69 * This ignores pointers and is_owned flags and looks at the values in fields.
70 * Two objects with NULL inner values will be considered "equal" here.
72 public bool eq(org.ldk.structs.TxComplete b) {
73 bool ret = bindings.TxComplete_eq(this.ptr, b == null ? 0 : b.ptr);
76 if (this != null) { this.ptrs_to.AddLast(b); };
80 public override bool Equals(object o) {
81 if (!(o is TxComplete)) return false;
82 return this.eq((TxComplete)o);
85 * Serialize the TxComplete object into a byte array which can be read by TxComplete_read
87 public byte[] write() {
88 byte[] ret = bindings.TxComplete_write(this.ptr);
94 * Read a TxComplete from a byte array, created by TxComplete_write
96 public static Result_TxCompleteDecodeErrorZ read(byte[] ser) {
97 long ret = bindings.TxComplete_read(ser);
99 if (ret >= 0 && ret <= 4096) { return null; }
100 Result_TxCompleteDecodeErrorZ ret_hu_conv = Result_TxCompleteDecodeErrorZ.constr_from_ptr(ret);