1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
11 * A reply_short_channel_ids_end message is sent as a reply to a
12 * query_short_channel_ids message. The query recipient makes a best
13 * effort to respond based on their local network view which may not be
14 * a perfect view of the network.
16 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
17 public class ReplyShortChannelIdsEnd extends CommonBase {
18 ReplyShortChannelIdsEnd(Object _dummy, long ptr) { super(ptr); }
19 @Override @SuppressWarnings("deprecation")
20 protected void finalize() throws Throwable {
22 if (ptr != 0) { bindings.ReplyShortChannelIdsEnd_free(ptr); }
26 * The genesis hash of the blockchain that was queried
28 public byte[] get_chain_hash() {
29 byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr);
34 * The genesis hash of the blockchain that was queried
36 public void set_chain_hash(byte[] val) {
37 bindings.ReplyShortChannelIdsEnd_set_chain_hash(this.ptr, val);
41 * Indicates if the query recipient maintains up-to-date channel
42 * information for the chain_hash
44 public boolean get_full_information() {
45 boolean 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(boolean val) {
54 bindings.ReplyShortChannelIdsEnd_set_full_information(this.ptr, val);
58 * Constructs a new ReplyShortChannelIdsEnd given each field
60 public static ReplyShortChannelIdsEnd of(byte[] chain_hash_arg, boolean full_information_arg) {
61 long ret = bindings.ReplyShortChannelIdsEnd_new(chain_hash_arg, full_information_arg);
62 if (ret < 1024) { return null; }
63 ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
64 ret_hu_conv.ptrs_to.add(ret_hu_conv);
69 * Creates a copy of the ReplyShortChannelIdsEnd
71 public ReplyShortChannelIdsEnd clone() {
72 long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
73 if (ret < 1024) { return null; }
74 ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
75 ret_hu_conv.ptrs_to.add(this);
80 * Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
82 public byte[] write() {
83 byte[] ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr);
88 * Read a ReplyShortChannelIdsEnd from a byte array, created by ReplyShortChannelIdsEnd_write
90 public static Result_ReplyShortChannelIdsEndDecodeErrorZ read(byte[] ser) {
91 long ret = bindings.ReplyShortChannelIdsEnd_read(ser);
92 if (ret < 1024) { return null; }
93 Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);