2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
5 public class TxOut extends CommonBase{
6 /** The script_pubkey in this output */
7 public final byte[] script_pubkey;
8 /** The value, in satoshis, of this output */
9 public final long value;
11 TxOut(java.lang.Object _dummy, long ptr) {
13 this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr);
14 this.value = bindings.TxOut_get_value(ptr);
16 public TxOut(long value, byte[] script_pubkey) {
17 super(bindings.TxOut_new(script_pubkey, value));
18 this.script_pubkey = bindings.TxOut_get_script_pubkey(ptr);
19 this.value = bindings.TxOut_get_value(ptr);
22 @Override @SuppressWarnings("deprecation")
23 protected void finalize() throws Throwable {
25 if (ptr != 0) { bindings.TxOut_free(ptr); }