1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class ChannelAnnouncement extends CommonBase {
10 ChannelAnnouncement(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.ChannelAnnouncement_free(ptr); }
17 public static ChannelAnnouncement constructor_clone(ChannelAnnouncement orig) {
18 long ret = bindings.ChannelAnnouncement_clone(orig == null ? 0 : orig.ptr & ~1);
19 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
20 ret_hu_conv.ptrs_to.add(orig);
24 public byte[] get_node_signature_1() {
25 byte[] ret = bindings.ChannelAnnouncement_get_node_signature_1(this.ptr);
29 public void set_node_signature_1(byte[] val) {
30 bindings.ChannelAnnouncement_set_node_signature_1(this.ptr, val);
33 public byte[] get_node_signature_2() {
34 byte[] ret = bindings.ChannelAnnouncement_get_node_signature_2(this.ptr);
38 public void set_node_signature_2(byte[] val) {
39 bindings.ChannelAnnouncement_set_node_signature_2(this.ptr, val);
42 public byte[] get_bitcoin_signature_1() {
43 byte[] ret = bindings.ChannelAnnouncement_get_bitcoin_signature_1(this.ptr);
47 public void set_bitcoin_signature_1(byte[] val) {
48 bindings.ChannelAnnouncement_set_bitcoin_signature_1(this.ptr, val);
51 public byte[] get_bitcoin_signature_2() {
52 byte[] ret = bindings.ChannelAnnouncement_get_bitcoin_signature_2(this.ptr);
56 public void set_bitcoin_signature_2(byte[] val) {
57 bindings.ChannelAnnouncement_set_bitcoin_signature_2(this.ptr, val);
60 public UnsignedChannelAnnouncement get_contents() {
61 long ret = bindings.ChannelAnnouncement_get_contents(this.ptr);
62 UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
66 public void set_contents(UnsignedChannelAnnouncement val) {
67 bindings.ChannelAnnouncement_set_contents(this.ptr, val == null ? 0 : val.ptr & ~1);
68 this.ptrs_to.add(val);
71 public static ChannelAnnouncement constructor_new(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, UnsignedChannelAnnouncement contents_arg) {
72 long ret = bindings.ChannelAnnouncement_new(node_signature_1_arg, node_signature_2_arg, bitcoin_signature_1_arg, bitcoin_signature_2_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1);
73 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
74 ret_hu_conv.ptrs_to.add(contents_arg);
78 public byte[] write(ChannelAnnouncement obj) {
79 byte[] ret = bindings.ChannelAnnouncement_write(obj == null ? 0 : obj.ptr & ~1);
80 this.ptrs_to.add(obj);
84 public static ChannelAnnouncement constructor_read(byte[] ser) {
85 long ret = bindings.ChannelAnnouncement_read(ser);
86 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);