6 namespace org { namespace ldk { namespace structs {
8 public class TxOut : CommonBase {
9 /** The script_pubkey in this output */
10 public readonly byte[] script_pubkey;
11 /** The value, in satoshis, of this output */
12 public readonly long value;
14 internal TxOut(object _dummy, long ptr) : base(ptr) {
15 this.script_pubkey = InternalUtils.decodeUint8Array(bindings.TxOut_get_script_pubkey(ptr));
16 this.value = bindings.TxOut_get_value(ptr);
18 public TxOut(long value, byte[] script_pubkey) : this(null, bindings.TxOut_new(InternalUtils.encodeUint8Array(script_pubkey), value)) {}
21 if (ptr != 0) { bindings.TxOut_free(ptr); }