]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/TxCreationKeys.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / TxCreationKeys.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 TxCreationKeys extends CommonBase {
10         TxCreationKeys(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.TxCreationKeys_free(ptr); }
15         }
16
17         public static TxCreationKeys constructor_clone(TxCreationKeys orig) {
18                 long ret = bindings.TxCreationKeys_clone(orig == null ? 0 : orig.ptr & ~1);
19                 TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
20                 ret_hu_conv.ptrs_to.add(orig);
21                 return ret_hu_conv;
22         }
23
24         public byte[] get_per_commitment_point() {
25                 byte[] ret = bindings.TxCreationKeys_get_per_commitment_point(this.ptr);
26                 return ret;
27         }
28
29         public void set_per_commitment_point(byte[] val) {
30                 bindings.TxCreationKeys_set_per_commitment_point(this.ptr, val);
31         }
32
33         public byte[] get_revocation_key() {
34                 byte[] ret = bindings.TxCreationKeys_get_revocation_key(this.ptr);
35                 return ret;
36         }
37
38         public void set_revocation_key(byte[] val) {
39                 bindings.TxCreationKeys_set_revocation_key(this.ptr, val);
40         }
41
42         public byte[] get_broadcaster_htlc_key() {
43                 byte[] ret = bindings.TxCreationKeys_get_broadcaster_htlc_key(this.ptr);
44                 return ret;
45         }
46
47         public void set_broadcaster_htlc_key(byte[] val) {
48                 bindings.TxCreationKeys_set_broadcaster_htlc_key(this.ptr, val);
49         }
50
51         public byte[] get_countersignatory_htlc_key() {
52                 byte[] ret = bindings.TxCreationKeys_get_countersignatory_htlc_key(this.ptr);
53                 return ret;
54         }
55
56         public void set_countersignatory_htlc_key(byte[] val) {
57                 bindings.TxCreationKeys_set_countersignatory_htlc_key(this.ptr, val);
58         }
59
60         public byte[] get_broadcaster_delayed_payment_key() {
61                 byte[] ret = bindings.TxCreationKeys_get_broadcaster_delayed_payment_key(this.ptr);
62                 return ret;
63         }
64
65         public void set_broadcaster_delayed_payment_key(byte[] val) {
66                 bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this.ptr, val);
67         }
68
69         public static TxCreationKeys constructor_new(byte[] per_commitment_point_arg, byte[] revocation_key_arg, byte[] broadcaster_htlc_key_arg, byte[] countersignatory_htlc_key_arg, byte[] broadcaster_delayed_payment_key_arg) {
70                 long ret = bindings.TxCreationKeys_new(per_commitment_point_arg, revocation_key_arg, broadcaster_htlc_key_arg, countersignatory_htlc_key_arg, broadcaster_delayed_payment_key_arg);
71                 TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
72                 return ret_hu_conv;
73         }
74
75         public byte[] write(TxCreationKeys obj) {
76                 byte[] ret = bindings.TxCreationKeys_write(obj == null ? 0 : obj.ptr & ~1);
77                 this.ptrs_to.add(obj);
78                 return ret;
79         }
80
81         public static TxCreationKeys constructor_read(byte[] ser) {
82                 long ret = bindings.TxCreationKeys_read(ser);
83                 TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
84                 return ret_hu_conv;
85         }
86
87         public Result_TxCreationKeysSecpErrorZ derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base) {
88                 long ret = bindings.TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base);
89                 Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
90                 ret_hu_conv.ptrs_to.add(this);
91                 return ret_hu_conv;
92         }
93
94 }