]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/ChannelAnnouncement.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / ChannelAnnouncement.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
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 {
13                 super.finalize();
14                 if (ptr != 0) { bindings.ChannelAnnouncement_free(ptr); }
15         }
16
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);
21                 return ret_hu_conv;
22         }
23
24         public byte[] get_node_signature_1() {
25                 byte[] ret = bindings.ChannelAnnouncement_get_node_signature_1(this.ptr);
26                 return ret;
27         }
28
29         public void set_node_signature_1(byte[] val) {
30                 bindings.ChannelAnnouncement_set_node_signature_1(this.ptr, val);
31         }
32
33         public byte[] get_node_signature_2() {
34                 byte[] ret = bindings.ChannelAnnouncement_get_node_signature_2(this.ptr);
35                 return ret;
36         }
37
38         public void set_node_signature_2(byte[] val) {
39                 bindings.ChannelAnnouncement_set_node_signature_2(this.ptr, val);
40         }
41
42         public byte[] get_bitcoin_signature_1() {
43                 byte[] ret = bindings.ChannelAnnouncement_get_bitcoin_signature_1(this.ptr);
44                 return ret;
45         }
46
47         public void set_bitcoin_signature_1(byte[] val) {
48                 bindings.ChannelAnnouncement_set_bitcoin_signature_1(this.ptr, val);
49         }
50
51         public byte[] get_bitcoin_signature_2() {
52                 byte[] ret = bindings.ChannelAnnouncement_get_bitcoin_signature_2(this.ptr);
53                 return ret;
54         }
55
56         public void set_bitcoin_signature_2(byte[] val) {
57                 bindings.ChannelAnnouncement_set_bitcoin_signature_2(this.ptr, val);
58         }
59
60         public UnsignedChannelAnnouncement get_contents() {
61                 long ret = bindings.ChannelAnnouncement_get_contents(this.ptr);
62                 UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
63                 return ret_hu_conv;
64         }
65
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);
69         }
70
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);
75                 return ret_hu_conv;
76         }
77
78         public byte[] write(ChannelAnnouncement obj) {
79                 byte[] ret = bindings.ChannelAnnouncement_write(obj == null ? 0 : obj.ptr & ~1);
80                 this.ptrs_to.add(obj);
81                 return ret;
82         }
83
84         public static ChannelAnnouncement constructor_read(byte[] ser) {
85                 long ret = bindings.ChannelAnnouncement_read(ser);
86                 ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
87                 return ret_hu_conv;
88         }
89
90 }