private byte[] SerializeWithoutWitness()
 {
     return(ByteArray.ConcatArrays(
                Version.ToByteArray(false),
                TxInCount.Bytes,
                SerializeTxIns(),
                TxOutCount.Bytes,
                SerializeTxOuts(),
                LockTime.ToByteArray(false)
                ));
 }
 public byte[] Serialize()
 {
     return(ByteArray.ConcatArrays(
                Version.ToByteArray(false),
                GetFlag(),
                TxInCount.Bytes,
                SerializeTxIns(),
                TxOutCount.Bytes,
                SerializeTxOuts(),
                GetWitness(),
                LockTime.ToByteArray(false)
                ));
 }