1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
9 public class TxOut extends CommonBase{
10 /** The script_pubkey in this output */
11 public final byte[] script_pubkey;
12 /** The value, in satoshis, of this output */
13 public final long value;
15 TxOut(java.lang.Object _dummy, long ptr) {
17 this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr);
18 this.value = bindings.TxOut_get_value(ptr);
20 public TxOut(long value, byte[] script_pubkey) {
21 super(bindings.TxOut_new(script_pubkey, value));
22 this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr);
23 this.value = bindings.TxOut_get_value(ptr);
26 @Override @SuppressWarnings("deprecation")
27 protected void finalize() throws Throwable {
29 if (ptr != 0) { bindings.TxOut_free(ptr); }