Update auto-updated Java files
[ldk-java] / src / main / java / org / ldk / structs / TxOut.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 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
9
10 public class TxOut extends CommonBase{
11         /** The script_pubkey in this output */
12         public final byte[] script_pubkey;
13         /** The value, in satoshis, of this output */
14         public final long value;
15
16         TxOut(java.lang.Object _dummy, long ptr) {
17                 super(ptr);
18                 this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr);
19                 this.value = bindings.TxOut_get_value(ptr);
20         }
21         public TxOut(long value, byte[] script_pubkey) {
22                 super(bindings.TxOut_new(script_pubkey, value));
23                 this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr);
24                 this.value = bindings.TxOut_get_value(ptr);
25         }
26
27         @Override @SuppressWarnings("deprecation")
28         protected void finalize() throws Throwable {
29                 super.finalize();
30                 if (ptr != 0) { bindings.TxOut_free(ptr); }
31         }
32
33 }