1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
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 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
16 public class ReplyShortChannelIdsEnd extends CommonBase {
17 ReplyShortChannelIdsEnd(Object _dummy, long ptr) { super(ptr); }
18 @Override @SuppressWarnings("deprecation")
19 protected void finalize() throws Throwable {
21 if (ptr != 0) { bindings.ReplyShortChannelIdsEnd_free(ptr); }
25 * The genesis hash of the blockchain that was queried
27 public byte[] get_chain_hash() {
28 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, val);
40 * Indicates if the query recipient maintains up-to-date channel
41 * information for the chain_hash
43 public boolean get_full_information() {
44 boolean ret = bindings.ReplyShortChannelIdsEnd_get_full_information(this.ptr);
49 * Indicates if the query recipient maintains up-to-date channel
50 * information for the chain_hash
52 public void set_full_information(boolean val) {
53 bindings.ReplyShortChannelIdsEnd_set_full_information(this.ptr, val);
57 * Constructs a new ReplyShortChannelIdsEnd given each field
59 public static ReplyShortChannelIdsEnd constructor_new(byte[] chain_hash_arg, boolean full_information_arg) {
60 long ret = bindings.ReplyShortChannelIdsEnd_new(chain_hash_arg, full_information_arg);
61 ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
62 ret_hu_conv.ptrs_to.add(ret_hu_conv);
67 * Creates a copy of the ReplyShortChannelIdsEnd
69 public ReplyShortChannelIdsEnd clone() {
70 long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
71 ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
72 ret_hu_conv.ptrs_to.add(this);
77 * Read a ReplyShortChannelIdsEnd from a byte array, created by ReplyShortChannelIdsEnd_write
79 public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_read(byte[] ser) {
80 long ret = bindings.ReplyShortChannelIdsEnd_read(ser);
81 Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
86 * Serialize the ReplyShortChannelIdsEnd object into a byte array which can be read by ReplyShortChannelIdsEnd_read
88 public byte[] write() {
89 byte[] ret = bindings.ReplyShortChannelIdsEnd_write(this.ptr);