Update to support None
[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
6 public class PreCalculatedTxCreationKeys extends CommonBase {
7         PreCalculatedTxCreationKeys(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.PreCalculatedTxCreationKeys_free(ptr); super.finalize();
11         }
12
13         public PreCalculatedTxCreationKeys(TxCreationKeys keys) {
14                 super(bindings.PreCalculatedTxCreationKeys_new(keys == null ? 0 : keys.ptr & ~1));
15                 this.ptrs_to.add(keys);
16         }
17
18         public TxCreationKeys trust_key_derivation() {
19                 TxCreationKeys ret = new TxCreationKeys(null, bindings.PreCalculatedTxCreationKeys_trust_key_derivation(this.ptr));
20                 return ret;
21         }
22
23         public byte[] per_commitment_point() {
24                 byte[] ret = bindings.PreCalculatedTxCreationKeys_per_commitment_point(this.ptr);
25                 return ret;
26         }
27
28 }