Update auto-generated Java bindings (all functionally equivalent)
[ldk-java] / src / main / java / org / ldk / structs / TxOut.java
index 709450f8745fcc6cc90d11e8f224b836092f7b70..b036b39c1bff98e67603d983b8a15c6f6132754b 100644 (file)
@@ -4,9 +4,29 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
 
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class TxOut extends CommonBase{
-       TxOut(java.lang.Object _dummy, long ptr) { super(ptr); }
-       long to_c_ptr() { return 0; }
+public class TxOut extends CommonBase {
+       /** The script_pubkey in this output */
+       public final byte[] script_pubkey;
+       /** The value, in satoshis, of this output */
+       public final long value;
+
+       TxOut(java.lang.Object _dummy, long ptr) {
+               super(ptr);
+               this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr);
+               this.value = bindings.TxOut_get_value(ptr);
+       }
+       public TxOut(long value, byte[] script_pubkey) {
+               super(bindings.TxOut_new(script_pubkey, value));
+               this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr);
+               this.value = bindings.TxOut_get_value(ptr);
+       }
+
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.TxOut_free(ptr); }
+       }
 }
\ No newline at end of file