6 namespace org { namespace ldk { namespace structs {
10 * A [`reply_short_channel_ids_end`] message is sent as a reply to a
11 * 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 * [`reply_short_channel_ids_end`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-query_short_channel_idsreply_short_channel_ids_end-messages
17 public class ReplyShortChannelIdsEnd : CommonBase {
18 internal ReplyShortChannelIdsEnd(object _dummy, long ptr) : base(ptr) { }
19 ~ReplyShortChannelIdsEnd() {
20 if (ptr != 0) { bindings.ReplyShortChannelIdsEnd_free(ptr); }
24 * The genesis hash of the blockchain that was queried
26 public byte[] get_chain_hash() {
27 byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr);
33 * The genesis hash of the blockchain that was queried
35 public void set_chain_hash(byte[] val) {
36 bindings.ReplyShortChannelIdsEnd_set_chain_hash(this.ptr, InternalUtils.check_arr_len(val, 32));
42 * Indicates if the query recipient maintains up-to-date channel
43 * information for the `chain_hash`
45 public bool get_full_information() {
46 bool ret = bindings.ReplyShortChannelIdsEnd_get_full_information(this.ptr);
52 * Indicates if the query recipient maintains up-to-date channel
53 * information for the `chain_hash`
55 public void set_full_information(bool val) {
56 bindings.ReplyShortChannelIdsEnd_set_full_information(this.ptr, val);
62 * Constructs a new ReplyShortChannelIdsEnd given each field
64 public static ReplyShortChannelIdsEnd of(byte[] chain_hash_arg, bool full_information_arg) {
65 long ret = bindings.ReplyShortChannelIdsEnd_new(InternalUtils.check_arr_len(chain_hash_arg, 32), full_information_arg);
66 GC.KeepAlive(chain_hash_arg);
67 GC.KeepAlive(full_information_arg);
68 if (ret >= 0 && ret <= 4096) { return null; }
69 org.ldk.structs.ReplyShortChannelIdsEnd ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReplyShortChannelIdsEnd(null, ret); }
70 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
74 internal long clone_ptr() {
75 long ret = bindings.ReplyShortChannelIdsEnd_clone_ptr(this.ptr);
81 * Creates a copy of the ReplyShortChannelIdsEnd
83 public ReplyShortChannelIdsEnd clone() {
84 long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
86 if (ret >= 0 && ret <= 4096) { return null; }
87 org.ldk.structs.ReplyShortChannelIdsEnd ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReplyShortChannelIdsEnd(null, ret); }
88 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
93 * Checks if two ReplyShortChannelIdsEnds contain equal inner contents.
94 * This ignores pointers and is_owned flags and looks at the values in fields.
95 * Two objects with NULL inner values will be considered "equal" here.
97 public bool eq(org.ldk.structs.ReplyShortChannelIdsEnd b) {
98 bool ret = bindings.ReplyShortChannelIdsEnd_eq(this.ptr, b == null ? 0 : b.ptr);
101 if (this != null) { this.ptrs_to.AddLast(b); };
105 public override bool Equals(object o) {
106 if (!(o is ReplyShortChannelIdsEnd)) return false;
107 return this.eq((ReplyShortChannelIdsEnd)o);
110 * Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
112 public byte[] write() {
113 byte[] ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr);
119 * Read a ReplyShortChannelIdsEnd from a byte array, created by ReplyShortChannelIdsEnd_write
121 public static Result_ReplyShortChannelIdsEndDecodeErrorZ read(byte[] ser) {
122 long ret = bindings.ReplyShortChannelIdsEnd_read(ser);
124 if (ret >= 0 && ret <= 4096) { return null; }
125 Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);