]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/PreCalculatedTxCreationKeys.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / PreCalculatedTxCreationKeys.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 PreCalculatedTxCreationKeys extends CommonBase {
10         PreCalculatedTxCreationKeys(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.PreCalculatedTxCreationKeys_free(ptr); }
15         }
16
17         public static PreCalculatedTxCreationKeys constructor_clone(PreCalculatedTxCreationKeys orig) {
18                 long ret = bindings.PreCalculatedTxCreationKeys_clone(orig == null ? 0 : orig.ptr & ~1);
19                 PreCalculatedTxCreationKeys ret_hu_conv = new PreCalculatedTxCreationKeys(null, ret);
20                 ret_hu_conv.ptrs_to.add(orig);
21                 return ret_hu_conv;
22         }
23
24         public static PreCalculatedTxCreationKeys constructor_new(TxCreationKeys keys) {
25                 long ret = bindings.PreCalculatedTxCreationKeys_new(keys == null ? 0 : keys.ptr & ~1);
26                 PreCalculatedTxCreationKeys ret_hu_conv = new PreCalculatedTxCreationKeys(null, ret);
27                 ret_hu_conv.ptrs_to.add(keys);
28                 return ret_hu_conv;
29         }
30
31         public TxCreationKeys trust_key_derivation() {
32                 long ret = bindings.PreCalculatedTxCreationKeys_trust_key_derivation(this.ptr);
33                 TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
34                 return ret_hu_conv;
35         }
36
37         public byte[] per_commitment_point() {
38                 byte[] ret = bindings.PreCalculatedTxCreationKeys_per_commitment_point(this.ptr);
39                 return ret;
40         }
41
42 }