12 Given the hyperbola $C: \frac{x^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1(a>0, b>0)$ with eccentricity $e=\sqrt{3}$, and the distance from its left focus $F_{1}$ to the asymptote is $\sqrt{2}$.
(1) Find the equation of the hyperbola $C$;
(2) If a line $l$ passing through the point $D(2,0)$ intersects the hyperbola $C$ at points $A$ and $B$, and the circle with diameter $AB$ passes through the origin $O$. Find the equation of the line $AB$.
(12) (1) According to the problem, we have $\frac{c}{a}=\sqrt{3}$, and $\frac{|-b c|}{\sqrt{a^{2}+b^{2}}}=\sqrt{2}$. Solving these, we get $a=1, b=\sqrt{2}$. Therefore, the equation of the hyperbola $C$ is $x^{2}-\frac{y^{2}}{2}=1$.
(2) It is easy to see that the line $A B$ does not coincide with the $x$-axis. Let the equation of $A B$ be $x=m y+2$. From $\left\{\begin{array}{l}x^{2}-\frac{y^{2}}{2}=1, \\ x=m y+2\end{array}\right.$ we get
$$
\left(2 m^{2}-1\right) y^{2}+8 m y+6=0 .
$$

From (1), the discriminant is
$$
\Delta=64 m^{2}-24\left(2 m^{2}-1\right)=16 m^{2}+24>0,
$$

and $2 m^{2}-1 \neq 0$, so $m^{2} \neq \frac{1}{2}$.
Let $A\left(x_{1}, y_{1}\right), B\left(x_{2}, y_{2}\right)$, then $y_{1}+y_{2}=-\frac{8 m}{2 m^{2}-1}, y_{1} y_{2}=$
$$
\frac{6}{2 m^{2}-1}
$$

Therefore,
$$
\begin{array}{c}
x_{1}+x_{2}=m\left(y_{1}+y_{2}\right)+4 \\
=m \cdot \frac{-8 m}{2 m^{2}-1}+4 \\
=-\frac{4}{2 m^{2}-1}, \\
x_{1} x_{2}=m^{2} y_{1} y_{2}+2 m\left(y_{1}+y_{2}\right)+4 \\
=\frac{6 m^{2}}{2 m^{2}-1}+2 m \cdot \frac{-8 m}{2 m^{2}-1}+4 \\
=-\frac{2 m^{2}+4}{2 m^{2}-1} .
\end{array}
$$

Since the circle with diameter $A B$ passes through the origin $O$, we have $x_{1} x_{2}+y_{1} y_{2}=0$.
Therefore, $6-\left(2 m^{2}+4\right)=0, m^{2}=1$.
Thus, the equation of the line $A B$ is $x= \pm y+2$, i.e., $y=x-2$ or $y=$ $-x+2$