[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / TxIn.cs
1 using org.ldk.impl;
2 using org.ldk.enums;
3 using org.ldk.util;
4 using System;
5
6 namespace org { namespace ldk { namespace structs {
7
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;
19
20         internal TxIn(object _dummy, long ptr) : base(ptr) {
21                 this.witness = InternalUtils.decodeUint8Array(bindings.TxIn_get_witness(ptr));
22                 this.script_sig = InternalUtils.decodeUint8Array(bindings.TxIn_get_script_sig(ptr));
23                 this.sequence = bindings.TxIn_get_sequence(ptr);
24                 this.previous_txid = InternalUtils.decodeUint8Array(bindings.TxIn_get_previous_txid(ptr));
25                 this.previous_vout = bindings.TxIn_get_previous_vout(ptr);
26         }
27         public TxIn(byte[] witness, byte[] script_sig, int sequence, byte[] previous_txid, int previous_vout)
28         : this(null, bindings.TxIn_new(InternalUtils.encodeUint8Array(witness), InternalUtils.encodeUint8Array(script_sig), sequence, InternalUtils.encodeUint8Array(previous_txid), previous_vout)) {}
29
30         ~TxIn() {
31                 if (ptr != 0) { bindings.TxIn_free(ptr); }
32         }
33 }} } }