6 namespace org { namespace ldk { namespace structs {
10 * A reply_short_channel_ids_end message is sent as a reply to a
11 * query_short_channel_ids message. The query recipient makes a best
12 * effort to respond based on their local network view which may not be
13 * a perfect view of the network.
15 public class ReplyShortChannelIdsEnd : CommonBase {
16 internal ReplyShortChannelIdsEnd(object _dummy, long ptr) : base(ptr) { }
17 ~ReplyShortChannelIdsEnd() {
18 if (ptr != 0) { bindings.ReplyShortChannelIdsEnd_free(ptr); }
22 * The genesis hash of the blockchain that was queried
24 public byte[] get_chain_hash() {
25 byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr);
31 * The genesis hash of the blockchain that was queried
33 public void set_chain_hash(byte[] val) {
34 bindings.ReplyShortChannelIdsEnd_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
40 * Indicates if the query recipient maintains up-to-date channel
41 * information for the chain_hash
43 public bool get_full_information() {
44 bool ret = bindings.ReplyShortChannelIdsEnd_get_full_information(this.ptr);
50 * Indicates if the query recipient maintains up-to-date channel
51 * information for the chain_hash
53 public void set_full_information(bool val) {
54 bindings.ReplyShortChannelIdsEnd_set_full_information(this.ptr, val);
60 * Constructs a new ReplyShortChannelIdsEnd given each field
62 public static ReplyShortChannelIdsEnd of(byte[] chain_hash_arg, bool full_information_arg) {
63 long ret = bindings.ReplyShortChannelIdsEnd_new(InternalUtils.check_arr_len(chain_hash_arg, 32), full_information_arg);
64 GC.KeepAlive(chain_hash_arg);
65 GC.KeepAlive(full_information_arg);
66 if (ret >= 0 && ret <= 4096) { return null; }
67 org.ldk.structs.ReplyShortChannelIdsEnd ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReplyShortChannelIdsEnd(null, ret); }
68 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
72 internal long clone_ptr() {
73 long ret = bindings.ReplyShortChannelIdsEnd_clone_ptr(this.ptr);
79 * Creates a copy of the ReplyShortChannelIdsEnd
81 public ReplyShortChannelIdsEnd clone() {
82 long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
84 if (ret >= 0 && ret <= 4096) { return null; }
85 org.ldk.structs.ReplyShortChannelIdsEnd ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReplyShortChannelIdsEnd(null, ret); }
86 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
91 * Checks if two ReplyShortChannelIdsEnds contain equal inner contents.
92 * This ignores pointers and is_owned flags and looks at the values in fields.
93 * Two objects with NULL inner values will be considered "equal" here.
95 public bool eq(org.ldk.structs.ReplyShortChannelIdsEnd b) {
96 bool ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0 : b.ptr);
99 if (this != null) { this.ptrs_to.AddLast(b); };
103 public override bool Equals(object o) {
104 if (!(o is ReplyShortChannelIdsEnd)) return false;
105 return this.eq((ReplyShortChannelIdsEnd)o);
108 * Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
110 public byte[] write() {
111 byte[] ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr);
117 * Read a ReplyShortChannelIdsEnd from a byte array, created by ReplyShortChannelIdsEnd_write
119 public static Result_ReplyShortChannelIdsEndDecodeErrorZ read(byte[] ser) {
120 long ret = bindings.ReplyShortChannelIdsEnd_read(ser);
122 if (ret >= 0 && ret <= 4096) { return null; }
123 Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);