6 namespace org { namespace ldk { namespace structs {
8 public class TxIn : CommonBase {
9 /** The witness in this input, in serialized form */
10 public readonly byte[] witness;
11 /** The script_sig in this input */
12 public readonly byte[] script_sig;
13 /** The transaction output's sequence number */
14 public readonly int sequence;
15 /** The txid this input is spending */
16 public readonly byte[] previous_txid;
17 /** The output index within the spent transaction of the output this input is spending */
18 public readonly int previous_vout;
20 internal TxIn(object _dummy, long ptr) : base(ptr) {
21 this.witness = bindings.TxIn_get_witness(ptr);
22 this.script_sig = bindings.TxIn_get_script_sig(ptr);
23 this.sequence = bindings.TxIn_get_sequence(ptr);
24 this.previous_txid = bindings.TxIn_get_previous_txid(ptr);
25 this.previous_vout = bindings.TxIn_get_previous_vout(ptr);
27 public TxIn(byte[] witness, byte[] script_sig, int sequence, byte[] previous_txid, int previous_vout)
28 : this(null, bindings.TxIn_new(witness, script_sig, sequence, previous_txid, previous_vout)) {}
31 if (ptr != 0) { bindings.TxIn_free(ptr); }