]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/CommitmentSigned.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / CommitmentSigned.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 CommitmentSigned extends CommonBase {
10         CommitmentSigned(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.CommitmentSigned_free(ptr); }
15         }
16
17         public static CommitmentSigned constructor_clone(CommitmentSigned orig) {
18                 long ret = bindings.CommitmentSigned_clone(orig == null ? 0 : orig.ptr & ~1);
19                 CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
20                 ret_hu_conv.ptrs_to.add(orig);
21                 return ret_hu_conv;
22         }
23
24         public byte[] get_channel_id() {
25                 byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
26                 return ret;
27         }
28
29         public void set_channel_id(byte[] val) {
30                 bindings.CommitmentSigned_set_channel_id(this.ptr, val);
31         }
32
33         public byte[] get_signature() {
34                 byte[] ret = bindings.CommitmentSigned_get_signature(this.ptr);
35                 return ret;
36         }
37
38         public void set_signature(byte[] val) {
39                 bindings.CommitmentSigned_set_signature(this.ptr, val);
40         }
41
42         public void set_htlc_signatures(byte[][] val) {
43                 bindings.CommitmentSigned_set_htlc_signatures(this.ptr, val);
44         }
45
46         public static CommitmentSigned constructor_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg) {
47                 long ret = bindings.CommitmentSigned_new(channel_id_arg, signature_arg, htlc_signatures_arg);
48                 CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
49                 return ret_hu_conv;
50         }
51
52         public byte[] write(CommitmentSigned obj) {
53                 byte[] ret = bindings.CommitmentSigned_write(obj == null ? 0 : obj.ptr & ~1);
54                 this.ptrs_to.add(obj);
55                 return ret;
56         }
57
58         public static CommitmentSigned constructor_read(byte[] ser) {
59                 long ret = bindings.CommitmentSigned_read(ser);
60                 CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
61                 return ret_hu_conv;
62         }
63
64 }